From 8832b66ce4904ba2b094bd84763930bf8369e458 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 1 Sep 2008 18:16:53 +0000 Subject: [PATCH] - Gave the PlayerPawn base class a default damage fade color instead of hacking it into the actor when actually used. - Fixed: The DamageFade color was not saved in savegames. SVN r1190 (trunk) --- docs/rh-log.txt | 5 +++++ src/d_player.h | 1 - src/g_shared/shared_sbar.cpp | 10 ---------- src/m_menu.cpp | 2 +- src/p_user.cpp | 5 ++++- src/thingdef/thingdef_properties.cpp | 2 -- src/version.h | 2 +- wadsrc/static/actors/shared/player.txt | 1 + 8 files changed, 12 insertions(+), 16 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 258eb2bc7..55eb9853a 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +September 1, 2008 (Changes by Graf Zahl) +- Gave the PlayerPawn base class a default damage fade color instead of + hacking it into the actor when actually used. +- Fixed: The DamageFade color was not saved in savegames. + August 30, 2008 (Changes by Graf Zahl) - Added Blzut3's patch for a real Chex Quest game mode. diff --git a/src/d_player.h b/src/d_player.h index 41b266021..c722aa914 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -120,7 +120,6 @@ public: fixed_t AttackZOffset; // attack height, relative to player center // [CW] Fades for when you are being damaged. - bool HasDamageFade; float RedDamageFade; float GreenDamageFade; float BlueDamageFade; diff --git a/src/g_shared/shared_sbar.cpp b/src/g_shared/shared_sbar.cpp index 97efa360e..e3064790a 100644 --- a/src/g_shared/shared_sbar.cpp +++ b/src/g_shared/shared_sbar.cpp @@ -1474,16 +1474,6 @@ void DBaseStatusBar::BlendView (float blend[4]) cnt = 228; APlayerPawn *mo = players[consoleplayer].mo; - - // [CW] If no damage fade is specified, assume defaults. - if (!mo->HasDamageFade) - { - mo->HasDamageFade = true; - mo->RedDamageFade = 255; - mo->GreenDamageFade = 0; - mo->BlueDamageFade = 0; - } - AddBlend (mo->RedDamageFade / 255, mo->GreenDamageFade / 255, mo->BlueDamageFade / 255, cnt / 255.f, blend); } diff --git a/src/m_menu.cpp b/src/m_menu.cpp index f2a03d547..7b5e0693f 100644 --- a/src/m_menu.cpp +++ b/src/m_menu.cpp @@ -1999,7 +1999,7 @@ void M_QuitGame (int choice) // or one at random, between 1 and maximum number. if (gameinfo.gametype & (GAME_DoomStrifeChex)) { - int quitmsg = 0;gametic % (gameinfo.gametype == GAME_Doom ? (gameinfo.gametype != GAME_Chex ? NUM_QUITDOOMMESSAGES : NUM_QUITCHEXMESSAGES - 1) : NUM_QUITSTRIFEMESSAGES - 1); + int quitmsg = 0; if (gameinfo.gametype == GAME_Doom) quitmsg = gametic % NUM_QUITDOOMMESSAGES; else if (gameinfo.gametype == GAME_Strife) diff --git a/src/p_user.cpp b/src/p_user.cpp index 23dd67c1e..42260e1d5 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -422,7 +422,10 @@ void APlayerPawn::Serialize (FArchive &arc) << ScoreIcon << InvFirst << InvSel - << MorphWeapon; + << MorphWeapon + << RedDamageFade + << GreenDamageFade + << BlueDamageFade; } //=========================================================================== diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index 08e4210e4..ce06ef020 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -2490,8 +2490,6 @@ static void PlayerCrouchSprite (FScanner &sc, APlayerPawn *defaults, Baggage &ba //========================================================================== static void PlayerDmgScreenColor (FScanner &sc, APlayerPawn *defaults, Baggage &bag) { - defaults->HasDamageFade = true; - if (sc.CheckNumber ()) { sc.MustGetNumber (); diff --git a/src/version.h b/src/version.h index a9e1e4b0c..91f892803 100644 --- a/src/version.h +++ b/src/version.h @@ -75,7 +75,7 @@ // SAVESIG should match SAVEVER. // MINSAVEVER is the minimum level snapshot version that can be loaded. -#define MINSAVEVER 1181 +#define MINSAVEVER 1190 #if SVN_REVISION_NUMBER < MINSAVEVER // Never write a savegame with a version lower than what we need diff --git a/wadsrc/static/actors/shared/player.txt b/wadsrc/static/actors/shared/player.txt index 43a752527..618510cc5 100644 --- a/wadsrc/static/actors/shared/player.txt +++ b/wadsrc/static/actors/shared/player.txt @@ -26,6 +26,7 @@ Actor PlayerPawn : Actor native Player.SideMove 1,1 Player.ColorRange 0,0 Player.SoundClass "player" + Player.DamageScreenColor "ff 00 00" } Actor PlayerChunk : PlayerPawn native