From 4add2809a35a4b8e97f641bcb33a6f25ff71461c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 2 Oct 2009 09:21:37 +0000 Subject: [PATCH] - fixed: Savegames stored the global fixed light levels when saving a player. SVN r1893 (trunk) --- docs/rh-log.txt | 3 +++ src/p_user.cpp | 12 +++++++++--- src/r_things.cpp | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index f309fde3b..a38147619 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,6 @@ +October 2, 2009 (Changes by Graf Zahl) +- fixed: Savegames stored the global fixed light levels when saving a player. + October 1, 2009 (Changes by Graf Zahl) - Fixed some GCC warnings. - fixed: The BossCube could be blocked by floors and ceiling resulting diff --git a/src/p_user.cpp b/src/p_user.cpp index 014d837d4..7b6e34048 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -2514,19 +2514,25 @@ void player_t::Serialize (FArchive &arc) int fixedmap; arc << fixedmap; fixedcolormap = NOFIXEDCOLORMAP; - fixedlightlev = -1; + fixedlightlevel = -1; if (fixedmap >= NUMCOLORMAPS) { fixedcolormap = fixedmap - NUMCOLORMAPS; } else if (fixedmap > 0) { - fixedlightlev = fixedmap; + fixedlightlevel = fixedmap; } } + else if (SaveVersion < 1893) + { + int ll; + arc << fixedcolormap << ll; + fixedlightlevel = ll; + } else { - arc << fixedcolormap << fixedlightlev; + arc << fixedcolormap << fixedlightlevel; } arc << morphTics << MorphedPlayerClass diff --git a/src/r_things.cpp b/src/r_things.cpp index be5499e3e..5f88793e6 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -1857,7 +1857,7 @@ void R_DrawRemainingPlayerSprites() DTA_RenderStyle, vis->RenderStyle, DTA_FillColor, vis->FillColor, DTA_SpecialColormap, special, - DTA_ColorOverlay, overlay, + DTA_ColorOverlay, overlay.d, DTA_ColormapStyle, usecolormapstyle ? &colormapstyle : NULL, TAG_DONE); }