mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 23:24:41 +00:00
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:
parent
5d260bc58f
commit
cce40efd35
21 changed files with 250 additions and 134 deletions
|
|
@ -637,6 +637,7 @@ bool ExplosionData::onAdd()
|
|||
if( !Sim::findObject( debrisIDList[i], debrisList[i] ) )
|
||||
{
|
||||
Con::errorf( ConsoleLogEntry::General, "ExplosionData::onAdd: Invalid packet, bad datablockId(debris): 0x%x", debrisIDList[i] );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -648,6 +649,7 @@ bool ExplosionData::onAdd()
|
|||
if( Sim::findObject( emitterIDList[i], emitterList[i] ) == false)
|
||||
{
|
||||
Con::errorf( ConsoleLogEntry::General, "ExplosionData::onAdd: Invalid packet, bad datablockId(particle emitter): 0x%x", emitterIDList[i] );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -659,6 +661,7 @@ bool ExplosionData::onAdd()
|
|||
if( Sim::findObject( explosionIDList[k], explosionList[k] ) == false)
|
||||
{
|
||||
Con::errorf( ConsoleLogEntry::General, "ExplosionData::onAdd: Invalid packet, bad datablockId(explosion): 0x%x", explosionIDList[k] );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -880,20 +883,34 @@ bool ExplosionData::preload(bool server, String &errorStr)
|
|||
if (Parent::preload(server, errorStr) == false)
|
||||
return false;
|
||||
|
||||
if( !server )
|
||||
if (!server)
|
||||
{
|
||||
|
||||
if (!isSoundValid())
|
||||
{
|
||||
//return false; -TODO: trigger asset download
|
||||
}
|
||||
|
||||
if (!particleEmitter && particleEmitterId != 0)
|
||||
{
|
||||
if (Sim::findObject(particleEmitterId, particleEmitter) == false)
|
||||
{
|
||||
Con::errorf(ConsoleLogEntry::General, "Error, unable to load particle emitter for explosion datablock");
|
||||
errorStr = String::ToString("Error, unable to load particle emitter for explosion datablock");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
U32 i;
|
||||
for (i = 0; i < EC_NUM_EMITTERS; i++)
|
||||
{
|
||||
if (!emitterList[i] && emitterIDList[i] != 0)
|
||||
{
|
||||
if (Sim::findObject(emitterIDList[i], emitterList[i]) == false)
|
||||
{
|
||||
errorStr = String::ToString("Error, unable to load emitter[%i] for explosion datablock 0x%x", i, emitterIDList[i]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (getExplosionShape()) {
|
||||
|
|
|
|||
|
|
@ -704,7 +704,10 @@ bool ParticleEmitterData::preload(bool server, String &errorStr)
|
|||
{
|
||||
ParticleData* pData = NULL;
|
||||
if (Sim::findObject(dataBlockIds[i], pData) == false)
|
||||
Con::warnf(ConsoleLogEntry::General, "ParticleEmitterData(%s) unable to find particle datablock: %d", getName(), dataBlockIds[i]);
|
||||
{
|
||||
errorStr = String::ToString("ParticleEmitterData(%s) unable to find particle datablock: %d", getName(), dataBlockIds[i]);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
particleDataBlocks.push_back(pData);
|
||||
}
|
||||
|
|
@ -749,6 +752,7 @@ bool ParticleEmitterData::preload(bool server, String &errorStr)
|
|||
if (particleDataBlocks[i]->getTextureAsset()->getImageFile() != txr_name)
|
||||
{
|
||||
Con::warnf(ConsoleLogEntry::General, "ParticleEmitterData(%s) particles reference different textures.", getName());
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,6 +149,18 @@ bool SplashData::onAdd()
|
|||
if (Parent::onAdd() == false)
|
||||
return false;
|
||||
|
||||
S32 i;
|
||||
for (i = 0; i < NUM_EMITTERS; i++)
|
||||
{
|
||||
if (!emitterList[i] && emitterIDList[i] != 0)
|
||||
{
|
||||
if (Sim::findObject(emitterIDList[i], emitterList[i]) == false)
|
||||
{
|
||||
Con::errorf(ConsoleLogEntry::General, "ExplosionData::onAdd: Invalid packet, bad datablockId(particle emitter): 0x%x", emitterIDList[i]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -281,7 +293,8 @@ bool SplashData::preload(bool server, String &errorStr)
|
|||
{
|
||||
if( Sim::findObject( emitterIDList[i], emitterList[i] ) == false)
|
||||
{
|
||||
Con::errorf( ConsoleLogEntry::General, "SplashData::onAdd: Invalid packet, bad datablockId(particle emitter): 0x%x", emitterIDList[i] );
|
||||
errorStr = String::ToString("SplashData::onAdd: Invalid packet, bad datablockId(particle emitter): 0x%x", emitterIDList[i]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -299,7 +312,8 @@ bool SplashData::preload(bool server, String &errorStr)
|
|||
{
|
||||
if( !Sim::findObject(explosionId, explosion) )
|
||||
{
|
||||
Con::errorf(ConsoleLogEntry::General, "SplashData::preload: Invalid packet, bad datablockId(explosion): %d", explosionId);
|
||||
errorStr = String::ToString("SplashData::preload: Invalid packet, bad datablockId(explosion): %d", explosionId);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue