T3D 1.1 - crash when creating a Player with a bad datablock (fixed in 1.2)
by Daniel Buckmaster · in Torque 3D Professional · 01/27/2012 (8:50 am) · 0 replies
EDIT: Whoops, seems like this is fixed in 1.2 after all - but in setActionThread, not in unmount where I was looking.
Build: Torque 2D 1.1 Final
Platform: Windows 7 32 bit
Target: Player/AIPlayer class
Issues: When spawning a Player or AIPlayer and specifying a datablock that does not exist, the engine crashes due to the call to setActionThread in Player::unmount.
Suggestions:
I haven't confirmed if this problem persists in 1.2. I've looked a the Player source, and it seems to remain the same.
Build: Torque 2D 1.1 Final
Platform: Windows 7 32 bit
Target: Player/AIPlayer class
Issues: When spawning a Player or AIPlayer and specifying a datablock that does not exist, the engine crashes due to the call to setActionThread in Player::unmount.
Suggestions:
void Player::unmount()
{
// Reset back to root position during dismount. This copies what is
// done on the server and corrects the fact that the RootAnim change
// is not sent across to the client using the standard ActionMask.
if(mDataBlock)
setActionThread(PlayerData::RootAnim,true,false,false);
Parent::unmount();
}I haven't confirmed if this problem persists in 1.2. I've looked a the Player source, and it seems to remain the same.
About the author
Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!