From: Holger Schemel Date: Tue, 21 Apr 2020 18:05:33 +0000 (+0200) Subject: changed variable for counting number of tape players X-Git-Tag: 4.2.0.0~44 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=78062f2ea4fa51136670c372438cdc11e80578ac;p=rocksndiamonds.git changed variable for counting number of tape players --- diff --git a/src/files.c b/src/files.c index 981411f0..2f249ada 100644 --- a/src/files.c +++ b/src/files.c @@ -8105,7 +8105,6 @@ void SaveTape(int nr) { char *filename = getTapeFilename(nr); FILE *file; - int num_participating_players = 0; int tape_pos_size; int info_chunk_size; int body_chunk_size; @@ -8122,12 +8121,14 @@ void SaveTape(int nr) tape.file_version = FILE_VERSION_ACTUAL; tape.game_version = GAME_VERSION_ACTUAL; + tape.num_participating_players = 0; + // count number of participating players for (i = 0; i < MAX_PLAYERS; i++) if (tape.player_participates[i]) - num_participating_players++; + tape.num_participating_players++; - tape_pos_size = (tape.use_mouse ? 3 : num_participating_players) + 1; + tape_pos_size = (tape.use_mouse ? 3 : tape.num_participating_players) + 1; info_chunk_size = 2 + (strlen(tape.level_identifier) + 1) + 2; body_chunk_size = tape_pos_size * tape.length;