From 8770e2b8105f8bb38e5ab4f385e044de16436dea Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 22 Sep 2014 00:13:25 +0200 Subject: [PATCH] fixed bug where player actions were only mapped in team mode --- ChangeLog | 5 +++++ src/conftime.h | 2 +- src/game.c | 3 ++- src/tape.c | 9 +++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3011eeed..805bda13 100644 --- 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 diff --git a/src/conftime.h b/src/conftime.h index 9cde5495..5b62f83d 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2014-09-16 09:25" +#define COMPILE_DATE_STRING "2014-09-22 00:08" diff --git a/src/game.c b/src/game.c index ba066ed9..a906aad2 100644 --- a/src/game.c +++ b/src/game.c @@ -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]; diff --git a/src/tape.c b/src/tape.c index 526c6d1d..fb36f1e2 100644 --- a/src/tape.c +++ b/src/tape.c @@ -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; -- 2.34.1