Right click resets input state when placing building

This commit is contained in:
2024-01-15 12:45:11 +01:00
parent 15b3a2351a
commit 0023b23242

View File

@@ -242,8 +242,10 @@ void updatePlayerInput() {
break; break;
} }
case INPUT_BUILDING: { case INPUT_BUILDING: {
if (input->building <= BUILDING_NONE || input->building >= BUILDING_COUNT) { if (input->building <= BUILDING_NONE || input->building >= BUILDING_COUNT ||
isInputBtnJustUp(input, input->mapping.secondaryBtn)) {
input->state = INPUT_NONE; input->state = INPUT_NONE;
resetInputState(input);
return; return;
} }
BzTile sizeX = 0, sizeY = 0; BzTile sizeX = 0, sizeY = 0;