mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
Prevent crash when loading Player with no shape.
This commit is contained in:
parent
b97c4eff6c
commit
a87a891cfc
1 changed files with 2 additions and 1 deletions
|
|
@ -356,6 +356,7 @@ PlayerData::PlayerData()
|
||||||
decalID = 0;
|
decalID = 0;
|
||||||
decalOffset = 0.0f;
|
decalOffset = 0.0f;
|
||||||
|
|
||||||
|
actionCount = 0;
|
||||||
lookAction = 0;
|
lookAction = 0;
|
||||||
|
|
||||||
// size of bounding box
|
// 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)
|
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;
|
return;
|
||||||
|
|
||||||
if (action >= PlayerData::NumActionAnims)
|
if (action >= PlayerData::NumActionAnims)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue