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

@ -356,6 +356,7 @@ PlayerData::PlayerData()
decalID = 0;
decalOffset = 0.0f;
actionCount = 0;
lookAction = 0;
// size of bounding box
@ -427,9 +428,9 @@ bool PlayerData::preload(bool server, String &errorStr)
{
for( U32 i = 0; i < MaxSounds; ++ i )
{
String errorStr;
if( !sfxResolve( &sound[ i ], errorStr ) )
Con::errorf( "PlayerData::preload: %s", errorStr.c_str() );
String sfxErrorStr;
if( !sfxResolve( &sound[ i ], sfxErrorStr ) )
Con::errorf( "PlayerData::preload: %s", sfxErrorStr.c_str() );
}
}
@ -487,10 +488,6 @@ bool PlayerData::preload(bool server, String &errorStr)
dp->death = false;
if (dp->sequence != -1)
getGroundInfo(si,thread,dp);
// No real reason to spam the console about a missing jet animation
if (dStricmp(sp->name, "jet") != 0)
AssertWarn(dp->sequence != -1, avar("PlayerData::preload - Unable to find named animation sequence '%s'!", sp->name));
}
for (S32 b = 0; b < mShape->mSequences.size(); b++)
{
@ -586,7 +583,10 @@ bool PlayerData::preload(bool server, String &errorStr)
Torque::FS::FileNodeRef fileRef = Torque::FS::GetFileNode(mShapeFP[i].getPath());
if (!fileRef)
{
errorStr = String::ToString("PlayerData: Mounted image %d loading failed, shape \"%s\" is not found.",i,mShapeFP[i].getPath().getFullPath().c_str());
return false;
}
if(server)
mCRCFP[i] = fileRef->getChecksum();
@ -2952,7 +2952,7 @@ void Player::updateMove(const Move* move)
// Clamp acceleration.
F32 maxAcc = (mDataBlock->swimForce / getMass()) * TickSec;
if ( false && swimSpeed > maxAcc )
if ( swimSpeed > maxAcc )
swimAcc *= maxAcc / swimSpeed;
acc += swimAcc;
@ -3692,7 +3692,7 @@ bool Player::setActionThread(const char* sequence,bool hold,bool wait,bool fsp)
void Player::setActionThread(U32 action,bool forward,bool hold,bool wait,bool fsp, bool forceSet)
{
if (!mDataBlock || (mActionAnimation.action == action && mActionAnimation.forward == forward && !forceSet))
if (!mDataBlock || !mDataBlock->actionCount || (mActionAnimation.action == action && mActionAnimation.forward == forward && !forceSet))
return;
if (action >= PlayerData::NumActionAnims)
@ -6507,8 +6507,9 @@ DefineEngineMethod( Player, getDamageLocation, const char*, ( Point3F pos ),,
object->getDamageLocation(pos, buffer1, buffer2);
char *buff = Con::getReturnBuffer(128);
dSprintf(buff, 128, "%s %s", buffer1, buffer2);
static const U32 bufSize = 128;
char *buff = Con::getReturnBuffer(bufSize);
dSprintf(buff, bufSize, "%s %s", buffer1, buffer2);
return buff;
}