Properly set building owner + apply building pop capacity

This commit is contained in:
2024-01-23 18:39:53 +01:00
parent 547a1ca583
commit 2d11bb4675
14 changed files with 195 additions and 105 deletions

View File

@@ -252,7 +252,7 @@ void updatePlayerInput() {
getBuildingSize(input->building, &sizeX, &sizeY);
bool canPlace = canPlaceBuilding(game, input->building, tileX, tileY);
if (canPlace && isInputBtnDown(input, primaryBtn)) {
placeBuilding(game, input->building, tileX, tileY, (Owner) {PLAYER_BLUE});
placeBuilding(game, input->building, tileX, tileY, game->player);
}
input->buildingCanPlace = canPlace;
input->buildingPos = (Vec2i) {tileX, tileY};