added saving special tape properties
[rocksndiamonds.git] / src / game.c
index 1533d9555a231de40cd1a42c9368584604c8b233..a3cc0704876dc6b065c503b4a7a75fe2f988ac9c 100644 (file)
@@ -4790,6 +4790,9 @@ void GameWon(void)
     score = score_final = game.score_final;
     health = health_final = game.health_final;
 
+    // update game panel values before (delayed) counting of score (if any)
+    LevelSolved_DisplayFinalGameValues(time, score, health);
+
     // if level has time score defined, calculate new final game values
     if (time_score > 0)
     {
@@ -16331,8 +16334,12 @@ static void GameUndo(int steps)
   if (!CheckEngineSnapshotList())
     return;
 
+  int tape_property_bits = tape.property_bits;
+
   LoadEngineSnapshot_Undo(steps);
 
+  tape.property_bits |= tape_property_bits | TAPE_PROPERTY_SNAPSHOT;
+
   GameUndoRedoExt();
 }
 
@@ -16341,8 +16348,12 @@ static void GameRedo(int steps)
   if (!CheckEngineSnapshotList())
     return;
 
+  int tape_property_bits = tape.property_bits;
+
   LoadEngineSnapshot_Redo(steps);
 
+  tape.property_bits |= tape_property_bits | TAPE_PROPERTY_SNAPSHOT;
+
   GameUndoRedoExt();
 }