added playing door/gate sound when wrapping-around in EM engine
authorHolger Schemel <info@artsoft.org>
Thu, 28 May 2020 17:00:25 +0000 (19:00 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 28 May 2020 17:00:42 +0000 (19:00 +0200)
src/game_em/logic.c

index 6270550dd6ee8c5b36c1a9fd23a1b626038d5fb5..290066440bb70e75bcc3b48ad1f46bc702a5ee18 100644 (file)
@@ -1279,6 +1279,11 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy)
     }
   }
 
+  /* check for wrap-around movement */
+  if (ply->x < lev.left ||
+      ply->x > lev.right - 1)
+    play_element_sound(oldx, oldy, SOUND_door, Xdoor_1);
+
   return result;
 }