rnd-20060222-1-src
authorHolger Schemel <info@artsoft.org>
Wed, 22 Feb 2006 22:34:30 +0000 (23:34 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:50:51 +0000 (10:50 +0200)
* fixed little bug when trying to switch to player that does not exist
* added player switching (visual and quick) to R'n'D and EM game engine
* added setup option to select visual or quick in-game player switching

ChangeLog
src/conftime.h
src/game.c
src/tools.c

index 2bf75b8eb5fdbc2ccb10399748505793fc513690..80dee95832e2a2a2e97eaf2e194c5ca50193fb7d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-02-22
+       * fixed little bug when trying to switch to player that does not exist
+
+2006-02-19
+       * added player switching (visual and quick) to R'n'D and EM game engine
+       * added setup option to select visual or quick in-game player switching
+
 2006-02-16
        * added use of "Home" and "End" keys to handle element list in editor
 
index eaad628721f3f42f447e410eba0233ef284ec5a3..f9dde6fb6fe2c8f76809c6e99668f1d81fee84dc 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2006-02-19 21:10]"
+#define COMPILE_DATE_STRING "[2006-02-22 23:30]"
index 4bda5189bffd6a07b103a86bebc538edfbd6ad1c..19fcafdd74fa3acdef0094efc3d36877daa621ec 100644 (file)
@@ -8811,10 +8811,13 @@ void GameActions()
 
   if (ScreenMovPos == 0)       /* screen currently aligned at tile position */
   {
+    struct PlayerInfo *player = &stored_player[game.centered_to_player_next];
+
+    if (!player->active)
+      game.centered_to_player_next = game.centered_to_player;
+
     if (game.centered_to_player != game.centered_to_player_next)
     {
-      struct PlayerInfo *player = &stored_player[game.centered_to_player_next];
-
       DrawRelocatePlayer(player, setup.quick_switch);
 
       game.centered_to_player = game.centered_to_player_next;
index de8e9df3543af507fb16cd291b9906030906db26..712be2395879d8483061304dec048c086b0945b3 100644 (file)
@@ -5131,6 +5131,9 @@ int getGameFrameDelay_EM(int native_em_game_frame_delay)
 
 int getCenteredPlayer_EM()
 {
+  if (!native_em_level.ply[game.centered_to_player_next]->alive)
+    game.centered_to_player_next = game.centered_to_player;
+
   if (game.centered_to_player != game.centered_to_player_next)
     game.centered_to_player = game.centered_to_player_next;