From b21d837b5afc485dd141860dae1d4bd19025aad1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 24 Sep 2008 23:22:55 +0000 Subject: [PATCH] - Fixed: player.colorrange didn't read the parameters correctly. - Reverted an 'optimization' in d_dehacked.cpp that didn't work. SVN r1247 (trunk) --- docs/rh-log.txt | 8 ++++++++ src/d_dehacked.cpp | 9 +++++---- src/thingdef/thingdef_properties.cpp | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 727658133..318be118d 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,11 @@ +September 24, 2008 (Changes by Graf Zahl) +- Fixed: player.colorrange didn't read the parameters correctly. +- Reverted an 'optimization' in d_dehacked.cpp that didn't work. + +September 23, 2008 (Changes by Graf Zahl) +- Fixed: Old style decorations forgot all inherited states when installing + their labels. + September 22, 2008 (Changes by Graf Zahl) - Used the one unused byte in the state structure as a flag to tell what type the NextState parameter is. The code did some rather unsafe checks with it diff --git a/src/d_dehacked.cpp b/src/d_dehacked.cpp index 4a857219d..5f32dc31f 100644 --- a/src/d_dehacked.cpp +++ b/src/d_dehacked.cpp @@ -2583,15 +2583,16 @@ void FinishDehPatch () AActor *defaults2 = GetDefaultByType (subclass); memcpy (defaults2, defaults1, sizeof(AActor)); - // Make a copy the state labels + // Make a copy the replaced class's state labels + FStateDefinitions statedef; + statedef.MakeStateDefines(type); + if (!type->IsDescendantOf(RUNTIME_CLASS(AInventory))) { // If this is a hacked non-inventory item we must also copy AInventory's special states - FStateDefinitions statedef; - statedef.MakeStateDefines(type); statedef.AddStateDefines(RUNTIME_CLASS(AInventory)->ActorInfo->StateList); - statedef.InstallStates(subclass->ActorInfo, defaults2); } + statedef.InstallStates(subclass->ActorInfo, defaults2); // Use the DECORATE replacement feature to redirect all spawns // of the original class to the new one. diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index ea12c5530..d18dd7536 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -1835,7 +1835,7 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, face, S, PlayerPawn) DEFINE_CLASS_PROPERTY_PREFIX(player, colorrange, I_I, PlayerPawn) { PROP_INT_PARM(start, 0); - PROP_INT_PARM(end, 0); + PROP_INT_PARM(end, 1); if (start > end) swap (start, end);