spring: develop 690a9b28 | [ Diff ] [ Back to Repository ] | |||
Author | Committer | Branch | Timestamp | Parent |
---|---|---|---|---|
jK | jK | develop | 2012-01-11 09:42:50 | develop c55a5cb5 |
Changeset | fix unused hotkeys blocking further ones in the queue I thought deeply about the other ways to fix this problem, too. Those others are: using throw&catch or implement a IActionExecutor::WantsAction(). I settled on "the return (bool) solution" cause: * WantsAction causes extremely much code duplication in ExecuteAction & WantsAction * I needed to fix a lot functions and with the return type change I got compile errors, which allowed me to fix the function in arbitrary order (with the other solutions it wouldn't fail to compile and so you don't see what functions are fixed and which are not) * throw&catch is designed to be used for real errors, but those should still fail (print error & stop further hotkey processing). We are interested in special cases where it doesn't make sense to process a command (e.g. no units selected). |
|||
mod - rts/Game/Game.cpp | [ Diff ] [ File ] | |||
mod - rts/Game/IActionExecutor.h | [ Diff ] [ File ] | |||
mod - rts/Game/SyncedGameCommands.cpp | [ Diff ] [ File ] | |||
mod - rts/Game/UnsyncedGameCommands.cpp | [ Diff ] [ File ] | |||
mod - rts/Rendering/SmoothHeightMeshDrawer.cpp | [ Diff ] [ File ] |