mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-11 21:16:55 +03:00
Update collide.cpp
This commit is contained in:
parent
7e881c3b19
commit
31b10d37ad
1 changed files with 50 additions and 47 deletions
|
@ -314,11 +314,15 @@ bool CollideStaticSolid(ITEM_INFO* item, MESH_INFO* mesh, COLL_INFO* coll)
|
|||
}
|
||||
}
|
||||
|
||||
if (closestPlane != -1)
|
||||
{
|
||||
// This should never happen, but still
|
||||
if (closestPlane == -1)
|
||||
return false;
|
||||
|
||||
// Debug raycast
|
||||
{
|
||||
Vector3 p = collBounds.Center + (closestRay.direction * minDistance);
|
||||
g_Renderer.addLine3D(collBounds.Center, p, Vector4(1, 0, 1, 1));
|
||||
}
|
||||
|
||||
// Calculate delta between tested ray and original collision ray.
|
||||
// It is needed because tests are done on rays inverted in space which
|
||||
|
@ -364,7 +368,6 @@ bool CollideStaticSolid(ITEM_INFO* item, MESH_INFO* mesh, COLL_INFO* coll)
|
|||
// coll->collType = CT_LEFT;
|
||||
// break;
|
||||
//}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue