Keyboard inputs are weird, and this is somehow causing some players to wait 60 turns when they do a Ctrl-Wait instead of 30 turns. This is because two input events are registered by SDL, which causes a macro'd wait command to be sent to the engine twice.
Luckily FrontEndLib can tell when a key event is repeated. When a repeated keypress is seen, we can increment its repeat value by one. Then in CGameScreen::OnKeyDown if we see a macro'd wait command with exactly one repeat, we do not pass it to the engine. This solves the problem.
Keyboard inputs are weird, and this is somehow causing some players to wait 60 turns when they do a Ctrl-Wait instead of 30 turns. This is because two input events are registered by SDL, which causes a macro'd wait command to be sent to the engine twice.
Luckily
FrontEndLib
can tell when a key event is repeated. When a repeated keypress is seen, we can increment itsrepeat
value by one. Then inCGameScreen::OnKeyDown
if we see a macro'd wait command with exactly one repeat, we do not pass it to the engine. This solves the problem.