X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=92c54f12e73bafd1ce6e952d5cda1dfdb6ae4fcb;hb=c05d4094179dc56e100cc58771e5ae90b685309d;hp=de844f4298ca0351fcaceab4ce88082c9c8402c7;hpb=457e98ec0803cd9005a522018e7c255454d1e915;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index de844f42..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; @@ -14703,6 +14709,9 @@ void PlayLevelSound_MM(int xx, int yy, int element_mm, int action_mm) int x = xx - offset; int y = yy - offset; + if (!IS_MM_ELEMENT(element)) + element = EL_MM_DEFAULT; + PlayLevelSoundElementAction(x, y, element, action); }