Browse Source

fix crash with unclean exit
for player, if we're unmounting because we're being deleted, don't bother animating
for tsthreads in general, not much point in removing the threadlist, then checking if it's scaled

AzaezelX 2 months ago
parent
commit
03c99f845b
2 changed files with 3 additions and 2 deletions
  1. 3 1
      Engine/source/T3D/player.cpp
  2. 0 1
      Engine/source/ts/tsThread.cpp

+ 3 - 1
Engine/source/T3D/player.cpp

@@ -4604,10 +4604,12 @@ void Player::onUnmount( SceneObject *obj, S32 node )
 
 
 void Player::unmount()
 void Player::unmount()
 {
 {
+
    // Reset back to root position during dismount.  This copies what is
    // Reset back to root position during dismount.  This copies what is
    // done on the server and corrects the fact that the RootAnim change
    // done on the server and corrects the fact that the RootAnim change
    // is not sent across to the client using the standard ActionMask.
    // is not sent across to the client using the standard ActionMask.
-   setActionThread(PlayerData::RootAnim,true,false,false);
+   if (!isRemoved())
+      setActionThread(PlayerData::RootAnim,true,false,false);
 
 
    Parent::unmount();
    Parent::unmount();
 }
 }

+ 0 - 1
Engine/source/ts/tsThread.cpp

@@ -534,7 +534,6 @@ void TSShapeInstance::destroyThread(TSThread * thread)
    delete mThreadList[i];
    delete mThreadList[i];
    mThreadList.erase(i);
    mThreadList.erase(i);
    setDirty(AllDirtyMask);
    setDirty(AllDirtyMask);
-   checkScaleCurrentlyAnimated();
 }
 }
 
 
 U32 TSShapeInstance::threadCount()
 U32 TSShapeInstance::threadCount()