From 674843201414e1eea3dcc9f457888f96c9463d47 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 21 Jun 2011 07:28:48 +0000 Subject: [PATCH] - fixed: The compatibility savegame handling for the lightning code did not read the obsolete LightningLightLevels data from the savegame. SVN r3244 (trunk) --- src/g_shared/a_lightning.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/g_shared/a_lightning.cpp b/src/g_shared/a_lightning.cpp index bf748492e..8193b71b0 100644 --- a/src/g_shared/a_lightning.cpp +++ b/src/g_shared/a_lightning.cpp @@ -43,7 +43,22 @@ void DLightningThinker::Serialize (FArchive &arc) arc << Stopped << NextLightningFlash << LightningFlashCount; if (SaveVersion < 3243) - { // Do nothing with old savegames and just keep whatever the constructor made. + { + // Do nothing with old savegames and just keep whatever the constructor made + // but read the obsolete data from the savegame + for (i = (numsectors + (numsectors+7)/8); i > 0; --i) + { + if (SaveVersion < 3223) + { + BYTE bytelight; + arc << bytelight; + } + else + { + short shortlight; + arc << shortlight; + } + } return; }