Some entities (like birds) can have negative positions without being marked as out-of-world.
Refs #2430 This was SVN commit r16544.
This commit is contained in:
parent
120ff2c60c
commit
5c84c3e9e5
@ -374,7 +374,7 @@ private:
|
||||
|
||||
inline size_t Index(fixed position)
|
||||
{
|
||||
return (position / SUBDIVISION_SIZE).ToInt_RoundToZero();
|
||||
return Clamp((position / SUBDIVISION_SIZE).ToInt_RoundToZero(), 0, (int)m_ArrayWidth-1);
|
||||
}
|
||||
|
||||
inline size_t SubdivisionIdx(CFixedVector2D position)
|
||||
|
Loading…
Reference in New Issue
Block a user