Przeglądaj źródła

Fix for collision issues with scaled players

Players scaled after their creation have collision issues with terrain.
Changing this bit of code fixes those issues for downsized players, even
when shrunk to 10% of their original size.
RoundedIcon 9 lat temu
rodzic
commit
7924f056bd
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      Engine/source/T3D/player.cpp

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

@@ -4659,9 +4659,9 @@ Point3F Player::_move( const F32 travelTime, Collision *outCol )
       }
       }
       Point3F distance = end - start;
       Point3F distance = end - start;
 
 
-      if (mFabs(distance.x) < mObjBox.len_x() &&
-          mFabs(distance.y) < mObjBox.len_y() &&
-          mFabs(distance.z) < mObjBox.len_z())
+      if (mFabs(distance.x) < mScaledBox.len_x() &&
+          mFabs(distance.y) < mScaledBox.len_y() &&
+          mFabs(distance.z) < mScaledBox.len_z())
       {
       {
          // We can potentially early out of this.  If there are no polys in the clipped polylist at our
          // We can potentially early out of this.  If there are no polys in the clipped polylist at our
          //  end position, then we can bail, and just set start = end;
          //  end position, then we can bail, and just set start = end;