diff -r 7d0329f37181 -r f2b18754742f hedgewars/uInputHandler.pas --- a/hedgewars/uInputHandler.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uInputHandler.pas Tue Dec 17 00:02:52 2013 +0400 @@ -137,7 +137,9 @@ Trusted:= (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (CurrentHedgehog^.BotLevel = 0); - +// REVIEW OR FIXME +// ctrl/cmd + q to close engine and frontend - this seems like a bad idea, since we let people set arbitrary binds, and don't warn them of this. +// There's no confirmation at all // ctrl/cmd + q to close engine and frontend if(KeyDown and (code = SDLK_q)) then begin @@ -176,18 +178,30 @@ if KeyDown then begin + if CurrentBinds[code] = 'switch' then + LocalMessage:= LocalMessage or gmSwitch + else if CurrentBinds[code] = '+precise' then + LocalMessage:= LocalMessage or gmPrecise; + ParseCommand(CurrentBinds[code], Trusted); if (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (ReadyTimeLeft > 1) then ParseCommand('gencmd R', true) end else if (CurrentBinds[code][1] = '+') then begin + if CurrentBinds[code] = '+precise' then + LocalMessage:= LocalMessage and not(gmPrecise); s:= CurrentBinds[code]; s[1]:= '-'; ParseCommand(s, Trusted); if (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (ReadyTimeLeft > 1) then ParseCommand('gencmd R', true) - end; + end + else + begin + if CurrentBinds[code] = 'switch' then + LocalMessage:= LocalMessage and not(gmSwitch) + end end end;