Merge branch 'development' into style-cleanup

Conflicts:
	Engine/source/console/astNodes.cpp
	Engine/source/console/codeBlock.cpp
	Engine/source/console/compiledEval.cpp
	Engine/source/ts/collada/colladaAppMesh.cpp
	Engine/source/ts/tsShape.cpp
	Engine/source/ts/tsShapeConstruct.cpp
This commit is contained in:
Daniel Buckmaster 2014-12-15 12:15:55 +11:00
commit 33ff180593
2053 changed files with 172002 additions and 69530 deletions

View file

@ -749,9 +749,9 @@ bool ExplosionData::preload(bool server, String &errorStr)
if( !server )
{
String errorStr;
if( !sfxResolve( &soundProfile, errorStr ) )
Con::errorf(ConsoleLogEntry::General, "Error, unable to load sound profile for explosion datablock: %s", errorStr.c_str());
String sfxErrorStr;
if( !sfxResolve( &soundProfile, sfxErrorStr ) )
Con::errorf(ConsoleLogEntry::General, "Error, unable to load sound profile for explosion datablock: %s", sfxErrorStr.c_str());
if (!particleEmitter && particleEmitterId != 0)
if (Sim::findObject(particleEmitterId, particleEmitter) == false)
Con::errorf(ConsoleLogEntry::General, "Error, unable to load particle emitter for explosion datablock");
@ -784,6 +784,7 @@ bool ExplosionData::preload(bool server, String &errorStr)
//--------------------------------------
//
Explosion::Explosion()
: mDataBlock( NULL )
{
mTypeMask |= ExplosionObjectType | LightObjectType;
@ -844,6 +845,12 @@ bool Explosion::onAdd()
if ( !conn || !Parent::onAdd() )
return false;
if( !mDataBlock )
{
Con::errorf("Explosion::onAdd - Fail - No datablok");
return false;
}
mDelayMS = mDataBlock->delayMS + sgRandom.randI( -mDataBlock->delayVariance, mDataBlock->delayVariance );
mEndingMS = mDataBlock->lifetimeMS + sgRandom.randI( -mDataBlock->lifetimeVariance, mDataBlock->lifetimeVariance );
@ -957,10 +964,7 @@ void Explosion::onRemove()
mMainEmitter = NULL;
}
if (getSceneManager() != NULL)
getSceneManager()->removeObjectFromScene(this);
if (getContainer() != NULL)
getContainer()->removeObject(this);
removeFromScene();
Parent::onRemove();
}