diff --git a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankDraw.cpp b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankDraw.cpp index c409c8610d..afd5ef7d28 100644 --- a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankDraw.cpp +++ b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankDraw.cpp @@ -234,7 +234,12 @@ void W3DTankDraw::updateTreadPositions(Real uvDelta) else if (pTread->m_type == TREAD_RIGHT) //this tread needs to scroll backwards offset_u = pTread->m_materialSettings.customUVOffset.X - uvDelta; - + else + { + DEBUG_CRASH(("Unhandled case in W3DTankDraw::updateTreadPositions")); + offset_u = 0.0f; + } + // ensure coordinates of offset are in [0, 1] range: offset_u = offset_u - WWMath::Floor(offset_u); pTread->m_materialSettings.customUVOffset.Set(offset_u,0); diff --git a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankTruckDraw.cpp b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankTruckDraw.cpp index 6b5df1a249..95e1fa16e4 100644 --- a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankTruckDraw.cpp +++ b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankTruckDraw.cpp @@ -414,7 +414,12 @@ void W3DTankTruckDraw::updateTreadPositions(Real uvDelta) else if (pTread->m_type == TREAD_RIGHT) //this tread needs to scroll backwards offset_u = pTread->m_materialSettings.customUVOffset.X - uvDelta; - + else + { + DEBUG_CRASH(("Unhandled case in W3DTankTruckDraw::updateTreadPositions")); + offset_u = 0.0f; + } + // ensure coordinates of offset are in [0, 1] range: offset_u = offset_u - WWMath::Floor(offset_u); pTread->m_materialSettings.customUVOffset.Set(offset_u,0); diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankDraw.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankDraw.cpp index 269a56b033..28f7c33236 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankDraw.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankDraw.cpp @@ -234,7 +234,12 @@ void W3DTankDraw::updateTreadPositions(Real uvDelta) else if (pTread->m_type == TREAD_RIGHT) //this tread needs to scroll backwards offset_u = pTread->m_materialSettings.customUVOffset.X - uvDelta; - + else + { + DEBUG_CRASH(("Unhandled case in W3DTankDraw::updateTreadPositions")); + offset_u = 0.0f; + } + // ensure coordinates of offset are in [0, 1] range: offset_u = offset_u - WWMath::Floor(offset_u); pTread->m_materialSettings.customUVOffset.Set(offset_u,0); diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankTruckDraw.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankTruckDraw.cpp index 0a2687eb94..37e4763c69 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankTruckDraw.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DTankTruckDraw.cpp @@ -414,7 +414,12 @@ void W3DTankTruckDraw::updateTreadPositions(Real uvDelta) else if (pTread->m_type == TREAD_RIGHT) //this tread needs to scroll backwards offset_u = pTread->m_materialSettings.customUVOffset.X - uvDelta; - + else + { + DEBUG_CRASH(("Unhandled case in W3DTankTruckDraw::updateTreadPositions")); + offset_u = 0.0f; + } + // ensure coordinates of offset are in [0, 1] range: offset_u = offset_u - WWMath::Floor(offset_u); pTread->m_materialSettings.customUVOffset.Set(offset_u,0);