Browse Source

Fixed incorrect condition for assert

jorrit 2 years ago
parent
commit
6eb44ca1c3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Jolt/Physics/LargeIslandSplitter.cpp

+ 2 - 2
Jolt/Physics/LargeIslandSplitter.cpp

@@ -454,14 +454,14 @@ bool LargeIslandSplitter::SplitIsland(uint32 inIslandIndex, const IslandBuilder
 			inContactManager.GetAffectedBodies(*c, body1, body2);
 			inContactManager.GetAffectedBodies(*c, body1, body2);
 
 
 			uint32 idx1 = body1->GetIndexInActiveBodiesInternal();
 			uint32 idx1 = body1->GetIndexInActiveBodiesInternal();
-			if (idx1 != Body::cInactiveIndex && !body1->IsDynamic())
+			if (idx1 != Body::cInactiveIndex && body1->IsDynamic())
 			{
 			{
 				JPH_ASSERT(!body_used[idx1]);
 				JPH_ASSERT(!body_used[idx1]);
 				body_used[idx1] = true;
 				body_used[idx1] = true;
 			}
 			}
 
 
 			uint32 idx2 = body2->GetIndexInActiveBodiesInternal();
 			uint32 idx2 = body2->GetIndexInActiveBodiesInternal();
-			if (idx2 != Body::cInactiveIndex && !body2->IsDynamic())
+			if (idx2 != Body::cInactiveIndex && body2->IsDynamic())
 			{
 			{
 				JPH_ASSERT(!body_used[idx2]);
 				JPH_ASSERT(!body_used[idx2]);
 				body_used[idx2] = true;
 				body_used[idx2] = true;