Refactor LoadMapObjects/LoadMapObjs to take Point instead of int x/y

This commit is contained in:
ephphatha 2021-07-09 18:52:01 +10:00 committed by Anders Jenbo
commit 36ff5578fd
2 changed files with 15 additions and 14 deletions

View file

@ -86,7 +86,7 @@ int ObjIndex(Point position)
{
for (int i = 0; i < ActiveObjectCount; i++) {
int oi = ActiveObjects[i];
if (Objects[oi].position.x == x && Objects[oi].position.y == y)
if (Objects[oi].position == position)
return oi;
}
app_fatal("ObjIndex: Active object not found at (%i,%i)", position.x, position.y);