mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Prevent crash when loading Player with no shape.
This commit is contained in:
parent
b97c4eff6c
commit
a87a891cfc
|
|
@ -356,6 +356,7 @@ PlayerData::PlayerData()
|
|||
decalID = 0;
|
||||
decalOffset = 0.0f;
|
||||
|
||||
actionCount = 0;
|
||||
lookAction = 0;
|
||||
|
||||
// size of bounding box
|
||||
|
|
@ -3691,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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue