Fixed input when swapping scenery #38

Merged
merged 1 commit into from Feb 1, 2013

Projects

None yet

2 participants

@marcusmoller
Contributor

Without this fix, the swapScenery() event would be called for each key repeat. This would make the game swap scenery every millisecond or so as long as you held the KEY_SWAP_SCENERY down.

This new method makes sure that it's only called, when the key KEY_SWAP_SCENERY has been released as well.

@Cheeseness Cheeseness merged commit 3eaa886 into Cheeseness:master Feb 1, 2013
@Cheeseness
Owner

And so dies epilepsy mode :(

I'm going to merge this, but I think we should keep an eye out for behaviour when multiple keys are pressed.

@marcusmoller
Contributor

That shouldn't be a concern AFAIK. It basically calls the same function, al_key_down(), so it's nothing new compared to the old method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment