fixed bug where player actions were only mapped in team mode
authorHolger Schemel <info@artsoft.org>
Sun, 21 Sep 2014 22:13:25 +0000 (00:13 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 21 Sep 2014 22:13:25 +0000 (00:13 +0200)
ChangeLog
src/conftime.h
src/game.c
src/tape.c

index 3011eeedfe2c982496c6ce6ae1b9c6ebf67c001b..805bda13ecde7aa944f17fe0e117c3aad9008074 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-19
+       * fixed bug where player actions were only mapped in team mode
+         (this broke four tapes in automatic game engine unit test where
+         old levels contained a non-yellow player, like rnd_abby_king, 011)
+
 2014-09-15
        * removed large parts of the preprocessor hell of old and unused code
 
index 9cde54956bdf3fc54c59a9f1486e02831ed7ae0e..5b62f83dcf320ccfab36c71c062cf2a9a3dc6dc0 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2014-09-16 09:25"
+#define COMPILE_DATE_STRING "2014-09-22 00:08"
index ba066ed9bd6f740064244ccbbbf6d1f775ceded0..a906aad2379992b0539d746e1d11187071eecbaa 100644 (file)
@@ -11074,7 +11074,8 @@ void GameActions()
     TapeRecordAction(tape_action);
 
 #if USE_NEW_PLAYER_ASSIGNMENTS
-  if (game.team_mode)
+  // !!! also map player actions in single player mode !!!
+  // if (game.team_mode)
   {
     byte mapped_action[MAX_PLAYERS];
 
index 526c6d1d2fee3b2ba393a3d3e42021af6917034b..fb36f1e28806046a69c6b1dfe1a1cfc6c9ff6bec 100644 (file)
@@ -19,6 +19,8 @@
 #include "network.h"
 #include "cartoons.h"
 
+#define DEBUG_TAPE_WHEN_PLAYING                        FALSE
+
 /* tape button identifiers */
 #define TAPE_CTRL_ID_EJECT                     0
 #define TAPE_CTRL_ID_EXTRA                     1
@@ -733,6 +735,13 @@ byte *TapePlayAction()
   for (i = 0; i < MAX_PLAYERS; i++)
     action[i] = tape.pos[tape.counter].action[i];
 
+#if DEBUG_TAPE_WHEN_PLAYING
+  printf("%05d", FrameCounter);
+  for (i = 0; i < MAX_PLAYERS; i++)
+    printf("   %08x", action[i]);
+  printf("\n");
+#endif
+
   tape.set_centered_player = FALSE;
   tape.centered_player_nr_next = -999;