mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
add safeties for enum math across define boundaries
This commit is contained in:
parent
1230d0d280
commit
aa02e48c8d
20 changed files with 71 additions and 71 deletions
|
|
@ -326,7 +326,7 @@ void CoverPoint::render(ObjectRenderInst *ri, SceneRenderState *state, BaseMatIn
|
|||
|
||||
// Data for decorations.
|
||||
GFXStateBlockDesc desc;
|
||||
F32 height = (float)(mSize + 1) / NumSizes * 2.0f;
|
||||
F32 height = (float)(mSize + 1) / (F32)NumSizes * 2.0f;
|
||||
|
||||
// Draw an X if we're occupied.
|
||||
if(isOccupied())
|
||||
|
|
|
|||
|
|
@ -1293,7 +1293,7 @@ bool NavMesh::testEdgeCover(const Point3F &pos, const VectorF &dir, CoverPointDa
|
|||
U32 hits = 0;
|
||||
for(U32 j = 0; j < CoverPoint::NumSizes; j++)
|
||||
{
|
||||
Point3F test = pos + Point3F(0.0f, 0.0f, mWalkableHeight * j / CoverPoint::NumSizes);
|
||||
Point3F test = pos + Point3F(0.0f, 0.0f, mWalkableHeight * j / (F32)CoverPoint::NumSizes);
|
||||
if(getContainer()->castRay(test, test + norm * mCoverDist, StaticObjectType, &ray))
|
||||
{
|
||||
// Test peeking.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue