From: Holger Schemel Date: Wed, 5 Apr 2017 21:28:34 +0000 (+0200) Subject: fixed nasty bug with mouse actions breaking non-mouse tapes X-Git-Tag: 4.1.0.0~139 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=c05d4094179dc56e100cc58771e5ae90b685309d;p=rocksndiamonds.git fixed nasty bug with mouse actions breaking non-mouse tapes --- diff --git a/src/game.c b/src/game.c index 5ff50a1f..92c54f12 100644 --- a/src/game.c +++ b/src/game.c @@ -10977,6 +10977,9 @@ static byte PlayerActions(struct PlayerInfo *player, byte player_action) static void SetMouseActionFromTapeAction(struct MouseActionInfo *mouse_action, byte *tape_action) { + if (!tape.use_mouse) + return; + mouse_action->lx = tape_action[TAPE_ACTION_LX]; mouse_action->ly = tape_action[TAPE_ACTION_LY]; mouse_action->button = tape_action[TAPE_ACTION_BUTTON]; @@ -10985,6 +10988,9 @@ static void SetMouseActionFromTapeAction(struct MouseActionInfo *mouse_action, static void SetTapeActionFromMouseAction(byte *tape_action, struct MouseActionInfo *mouse_action) { + if (!tape.use_mouse) + return; + tape_action[TAPE_ACTION_LX] = mouse_action->lx; tape_action[TAPE_ACTION_LY] = mouse_action->ly; tape_action[TAPE_ACTION_BUTTON] = mouse_action->button;