1
0
forked from 0ad/0ad

Allow shift+click for multiple building placement

This was SVN commit r7519.
This commit is contained in:
Ykkrosh 2010-05-09 00:25:03 +00:00
parent 3c75dba1b8
commit c75029b6ab

View File

@ -269,9 +269,17 @@ function handleInputBeforeGui(ev)
if (ev.button == SDL_BUTTON_LEFT)
{
if (tryPlaceBuilding())
inputState = INPUT_NORMAL;
{
// If shift is down, let the player continue placing another of the same building
if (specialKeyStates[SDLK_RSHIFT] || specialKeyStates[SDLK_LSHIFT])
inputState = INPUT_BUILDING_PLACEMENT;
else
inputState = INPUT_NORMAL;
}
else
{
inputState = INPUT_BUILDING_PLACEMENT;
}
return true;
}
break;