fix particle glow

multiple preloads were failing to return false or mesages on failure of mandatory entries.
clear out redundant isScriptFile definition
fix default order of /scripts/managedData script files
This commit is contained in:
AzaezelX 2025-11-13 14:29:25 -06:00
parent 5d260bc58f
commit cce40efd35
21 changed files with 250 additions and 134 deletions

View file

@ -336,6 +336,47 @@ bool ProjectileData::onAdd()
if(!Parent::onAdd())
return false;
if (!particleEmitter && particleEmitterId != 0)
{
if (Sim::findObject(particleEmitterId, particleEmitter) == false)
{
Con::errorf(ConsoleLogEntry::General, "ProjectileData::onAdd: Invalid packet, bad datablockId(particleEmitter): 0x%x", particleEmitterId);
return false;
}
}
if (!explosion && explosionId != 0)
{
if (Sim::findObject(explosionId, explosion) == false)
{
Con::errorf(ConsoleLogEntry::General, "ProjectileData::onAdd: Invalid packet, bad datablockId(explosion): 0x%x", explosionId);
return false;
}
}
if (!waterExplosion && waterExplosionId != 0)
{
if (Sim::findObject(waterExplosionId, waterExplosion) == false)
{
Con::errorf(ConsoleLogEntry::General, "ProjectileData::onAdd: Invalid packet, bad datablockId(waterExplosion): 0x%x", waterExplosionId);
return false;
}
}
if (!splash && splashId != 0)
{
if (Sim::findObject(splashId, splash) == false)
{
Con::errorf(ConsoleLogEntry::General, "ProjectileData::onAdd: Invalid packet, bad datablockId(waterExplosion): 0x%x", splashId);
return false;
}
}
if (!decal && decalId != 0)
{
if (Sim::findObject(decalId, decal) == false)
{
Con::errorf(ConsoleLogEntry::General, "ProjectileData::onAdd: Invalid packet, bad datablockId(waterExplosion): 0x%x", decalId);
return false;
}
}
return true;
}