From 86a7a3249fc9caccb73068eabbdda253f7bab408 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 15 Jul 2012 01:46:47 +0000 Subject: [PATCH 1/6] - Added compatibility options for Requiem map04 and Hell Revealed map19. SVN r3761 (trunk) --- wadsrc/static/compatibility.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wadsrc/static/compatibility.txt b/wadsrc/static/compatibility.txt index 531e89a4d..261b91574 100644 --- a/wadsrc/static/compatibility.txt +++ b/wadsrc/static/compatibility.txt @@ -66,6 +66,7 @@ F84AB4557464A383E93F37CD3A82AC48 // MM2 map03 71C2E6D9CFA3D8750C6A9599FB2453BD // Hacx map03: There are some switches behind 96368EB950E33AF62EA6423434E3CEF7 // HacX map17: shootable covers in these levels +BA530202AF0BA0C6CBAE6A0C7076FB72 // Requiem map04 { useblocking } @@ -176,3 +177,10 @@ E2B5D1400279335811C1C1C0B437D9C8 // Deathknights of the Dark Citadel, map54 { floormove } + +// There is a special at the beginning of the level which relies on the Pain Elemental's lost soul limit. +811A0C97777A198BC9B2BB558CB46E6A // Hell Revealed map19 +{ + limitpain +} + From 6f93b88245e2eb4d5f1a37fbd2a6eb9f6bb40caa Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 15 Jul 2012 01:59:49 +0000 Subject: [PATCH 2/6] - Fixed type in A_Respawn. SVN r3762 (trunk) --- src/thingdef/thingdef_codeptr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index e80fb3879..a47e1e067 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -2704,7 +2704,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Respawn) } else { - oktorespawn = P_CheckPosition(self, self->x, self->z, true); + oktorespawn = P_CheckPosition(self, self->x, self->y, true); } if (oktorespawn) From a26cd841ae467c0ed6a307a727e0daf17dd4f2eb Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 15 Jul 2012 03:10:00 +0000 Subject: [PATCH 3/6] - Fixed: Getting remorphed into a chicken should give you a Tome of Power so that you become a super chicken. Rawr! The PlayerPawn flag CANSUPERMORPH now enables this. SVN r3763 (trunk) --- src/d_player.h | 1 + src/g_shared/a_morph.cpp | 7 +++++++ src/thingdef/thingdef_data.cpp | 1 + wadsrc/static/actors/heretic/chicken.txt | 1 + 4 files changed, 10 insertions(+) diff --git a/src/d_player.h b/src/d_player.h index aa0128848..d8fb75eae 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -159,6 +159,7 @@ class APlayerChunk : public APlayerPawn enum { PPF_NOTHRUSTWHENINVUL = 1, // Attacks do not thrust the player if they are invulnerable. + PPF_CANSUPERMORPH = 2, // Being remorphed into this class can give you a Tome of Power }; // diff --git a/src/g_shared/a_morph.cpp b/src/g_shared/a_morph.cpp index d3b8d4ac8..a027afcc5 100644 --- a/src/g_shared/a_morph.cpp +++ b/src/g_shared/a_morph.cpp @@ -47,6 +47,13 @@ bool P_MorphPlayer (player_t *activator, player_t *p, const PClass *spawntype, i } if (p->morphTics) { // Player is already a beast + if ((p->mo->GetClass() == spawntype) + && (p->mo->PlayerFlags & PPF_CANSUPERMORPH) + && (p->morphTics < (((duration) ? duration : MORPHTICS) - TICRATE)) + && (p->mo->FindInventory (RUNTIME_CLASS(APowerWeaponLevel2), true) == NULL)) + { // Make a super chicken + p->mo->GiveInventoryType (RUNTIME_CLASS(APowerWeaponLevel2)); + } return false; } if (p->health <= 0) diff --git a/src/thingdef/thingdef_data.cpp b/src/thingdef/thingdef_data.cpp index 751a6a0ca..fe94a2fcc 100644 --- a/src/thingdef/thingdef_data.cpp +++ b/src/thingdef/thingdef_data.cpp @@ -333,6 +333,7 @@ static FFlagDef PlayerPawnFlags[] = { // PlayerPawn flags DEFINE_FLAG(PPF, NOTHRUSTWHENINVUL, APlayerPawn, PlayerFlags), + DEFINE_FLAG(PPF, CANSUPERMORPH, APlayerPawn, PlayerFlags), }; static const struct FFlagList { const PClass *Type; FFlagDef *Defs; int NumDefs; } FlagLists[] = diff --git a/wadsrc/static/actors/heretic/chicken.txt b/wadsrc/static/actors/heretic/chicken.txt index 2bed5248c..029dca014 100644 --- a/wadsrc/static/actors/heretic/chicken.txt +++ b/wadsrc/static/actors/heretic/chicken.txt @@ -68,6 +68,7 @@ ACTOR ChickenPlayer : PlayerPawn native Speed 1 Gravity 0.125 +NOSKIN + +CANSUPERMORPH PainSound "chicken/pain" DeathSound "chicken/death" Player.JumpZ 1 From fcd48547141d705990145c14150a49aacbfd74b7 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 15 Jul 2012 03:33:28 +0000 Subject: [PATCH 4/6] - Fixed: FListMenuItemPlayerDisplay could crash at various points if a class does not have a See state. SVN r3764 (trunk) --- src/menu/playerdisplay.cpp | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/src/menu/playerdisplay.cpp b/src/menu/playerdisplay.cpp index aa8208004..256ca6a49 100644 --- a/src/menu/playerdisplay.cpp +++ b/src/menu/playerdisplay.cpp @@ -385,7 +385,11 @@ void FListMenuItemPlayerDisplay::UpdateRandomClass() if (++mRandomClass >= (int)PlayerClasses.Size ()) mRandomClass = 0; mPlayerClass = &PlayerClasses[mRandomClass]; mPlayerState = GetDefaultByType (mPlayerClass->Type)->SeeState; - mPlayerTics = mPlayerState->GetTics(); + if (mPlayerState == NULL) + { // No see state, so try spawn state. + mPlayerState = GetDefaultByType (mPlayerClass->Type)->SpawnState; + } + mPlayerTics = mPlayerState != NULL ? mPlayerState->GetTics() : -1; mRandomTimer = 6; // Since the newly displayed class may used a different translation @@ -436,7 +440,11 @@ void FListMenuItemPlayerDisplay::SetPlayerClass(int classnum, bool force) { mPlayerClass = &PlayerClasses[classnum]; mPlayerState = GetDefaultByType (mPlayerClass->Type)->SeeState; - mPlayerTics = mPlayerState->GetTics(); + if (mPlayerState == NULL) + { // No see state, so try spawn state. + mPlayerState = GetDefaultByType (mPlayerClass->Type)->SpawnState; + } + mPlayerTics = mPlayerState != NULL ? mPlayerState->GetTics() : -1; mClassNum = classnum; } } @@ -558,17 +566,20 @@ void FListMenuItemPlayerDisplay::Drawer(bool selected) spriteframe_t *sprframe; fixed_t scaleX, scaleY; - if (mSkin == 0) + if (mPlayerState != NULL) { - sprframe = &SpriteFrames[sprites[mPlayerState->sprite].spriteframes + mPlayerState->GetFrame()]; - scaleX = GetDefaultByType(mPlayerClass->Type)->scaleX; - scaleY = GetDefaultByType(mPlayerClass->Type)->scaleY; - } - else - { - sprframe = &SpriteFrames[sprites[skins[mSkin].sprite].spriteframes + mPlayerState->GetFrame()]; - scaleX = skins[mSkin].ScaleX; - scaleY = skins[mSkin].ScaleY; + if (mSkin == 0) + { + sprframe = &SpriteFrames[sprites[mPlayerState->sprite].spriteframes + mPlayerState->GetFrame()]; + scaleX = GetDefaultByType(mPlayerClass->Type)->scaleX; + scaleY = GetDefaultByType(mPlayerClass->Type)->scaleY; + } + else + { + sprframe = &SpriteFrames[sprites[skins[mSkin].sprite].spriteframes + mPlayerState->GetFrame()]; + scaleX = skins[mSkin].ScaleX; + scaleY = skins[mSkin].ScaleY; + } } if (sprframe != NULL) From dac802d28a8f20573f5ed6945ed6c0e93172fb60 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 15 Jul 2012 03:55:05 +0000 Subject: [PATCH 5/6] - Fixed: Toggling the automap could cancel out ending the level, among other things. SVN r3765 (trunk) --- src/am_map.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/am_map.cpp b/src/am_map.cpp index 44b6da619..bb0215242 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -1158,7 +1158,10 @@ void AM_NewResolution() CCMD (togglemap) { - gameaction = ga_togglemap; + if (gameaction == ga_nothing) + { + gameaction = ga_togglemap; + } } //============================================================================= From fdc6a03125de2f2044f1384b7658909f9d149df8 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 15 Jul 2012 23:00:16 +0000 Subject: [PATCH 6/6] - Remove Item from StateCallData, since it isn't read anywhere. SVN r3766 (trunk) --- src/thingdef/thingdef.h | 1 - src/thingdef/thingdef_codeptr.cpp | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/thingdef/thingdef.h b/src/thingdef/thingdef.h index b32a15b02..a7de7285d 100644 --- a/src/thingdef/thingdef.h +++ b/src/thingdef/thingdef.h @@ -363,7 +363,6 @@ int MatchString (const char *in, const char **strings); struct StateCallData { FState *State; - AActor *Item; bool Result; }; diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index a47e1e067..14361d597 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -100,7 +100,6 @@ bool ACustomInventory::CallStateChain (AActor *actor, FState * State) bool result = false; int counter = 0; - StateCall.Item = this; while (State != NULL) { // Assume success. The code pointer will set this to false if necessary @@ -2618,6 +2617,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckFloor) // A_CheckCeiling // [GZ] Totally copied on A_CheckFloor, jumps if actor touches ceiling // + //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckCeiling) { @@ -4192,6 +4192,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Warp) //========================================================================== // // ACS_Named* stuff + // // These are exactly like their un-named line special equivalents, except // they take strings instead of integers to indicate which script to run.