mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
NavMesh util assert cleanup
Use actual array size for array access asserts.
This commit is contained in:
parent
f18f2f3e9e
commit
33e1795cf1
@ -22,7 +22,7 @@ inline uint32_t g_pHullMasks[10] = // Hull mask table [r5apex_ds.exe + 131a2f8].
|
||||
//-----------------------------------------------------------------------------
|
||||
dtNavMesh* GetNavMeshForHull(int hullSize)
|
||||
{
|
||||
assert(hullSize >= 0 && hullSize <= 4); // Programmer error.
|
||||
assert(hullSize >= NULL && hullSize < MAX_HULLS); // Programmer error.
|
||||
return g_pNavMesh[hullSize];
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ dtNavMesh* GetNavMeshForHull(int hullSize)
|
||||
//-----------------------------------------------------------------------------
|
||||
uint32_t GetHullMaskById(int hullId)
|
||||
{
|
||||
assert(hullId >= 0 && hullId <= 9); // Programmer error.
|
||||
assert(hullId >= NULL && hullId < SDK_ARRAYSIZE(g_pHullMasks)); // Programmer error.
|
||||
return (hullId + g_pHullMasks[hullId]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user