Fix bounds for inserting into spatial grid
This commit is contained in:
@@ -65,7 +65,7 @@ ecs_entity_t placeBuilding(Game *game, BuildingType type,
|
||||
ecs_set(ECS, building, Rotation, {0});
|
||||
|
||||
SpatialGridID gridID = bzSpatialGridInsert(game->entityGrid, &building,
|
||||
pos.x, pos.y,
|
||||
pos.x - size.x * 0.5f, pos.y - size.y * 0.5f,
|
||||
size.x, size.y);
|
||||
ecs_set_ptr(ECS, building, SpatialGridID, &gridID);
|
||||
ecs_set_ptr(ECS, building, Owner, &owner);
|
||||
|
||||
Reference in New Issue
Block a user