Add missing collisions to buildings

This commit is contained in:
2023-11-12 11:24:59 +01:00
parent 10e47a6ad4
commit df5e65f9d7
3 changed files with 809 additions and 29 deletions

View File

@@ -286,7 +286,7 @@ void render(float dt, Game *game) {
DrawRectangleLines(tileX * 16, tileY * 16, sizeX * 16, sizeY * 16, placeColor);
if (canPlace && IsMouseButtonDown(MOUSE_BUTTON_LEFT)) {
if (canPlace && IsMouseButtonDown(MOUSE_BUTTON_LEFT) && !io->WantCaptureMouse) {
placeBuilding(&game->map, selectedBuilding, tileX, tileY, sizeX, sizeY);
}