From 6053627c5c96ddced0293764b9e950c9ad81d9b6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 26 May 2011 23:27:58 +0000 Subject: [PATCH] - added DONTCORPSE submission. SVN r3216 (trunk) --- src/actor.h | 1 + src/p_interaction.cpp | 3 ++- src/p_mobj.cpp | 4 ++++ src/thingdef/thingdef_data.cpp | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/actor.h b/src/actor.h index 49d438be8..c41403004 100644 --- a/src/actor.h +++ b/src/actor.h @@ -327,6 +327,7 @@ enum MF6_NOMENU = 0x00400000, // Player class should not appear in the class selection menu. MF6_BOSSCUBE = 0x00800000, // Actor spawned by A_BrainSpit, flagged for timefreeze reasons. MF6_SEEINVISIBLE = 0x01000000, // Monsters can see invisible player. + MF6_DONTCORPSE = 0x02000000, // [RC] Don't autoset MF_CORPSE upon death and don't force Crash state change. // --- mobj.renderflags --- diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index b39a4017f..57f30d377 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -384,7 +384,8 @@ void AActor::Die (AActor *source, AActor *inflictor) { // [RH] Only monsters get to be corpses. // Objects with a raise state should get the flag as well so they can // be revived by an Arch-Vile. Batman Doom needs this. - flags |= MF_CORPSE; + // [RC] And disable this if DONTCORPSE is set, of course. + if(!(flags6 & MF6_DONTCORPSE)) flags |= MF_CORPSE; } flags6 |= MF6_KILLED; diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 7c431834a..eba8ce570 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -5485,6 +5485,9 @@ int AActor::GibHealth() void AActor::Crash() { + // [RC] Weird that this forces the Crash state regardless of flag. + if(!(flags6 & MF6_DONTCORPSE)) + { if (((flags & MF_CORPSE) || (flags6 & MF6_KILLED)) && !(flags3 & MF3_CRASHED) && !(flags & MF_ICECORPSE)) @@ -5511,6 +5514,7 @@ void AActor::Crash() // so this code doesn't have to be executed repeatedly. flags3 |= MF3_CRASHED; } + } } void AActor::SetIdle() diff --git a/src/thingdef/thingdef_data.cpp b/src/thingdef/thingdef_data.cpp index 3c0c99c47..5d0c274bf 100644 --- a/src/thingdef/thingdef_data.cpp +++ b/src/thingdef/thingdef_data.cpp @@ -230,6 +230,7 @@ static FFlagDef ActorFlags[]= DEFINE_FLAG(MF6, BLOCKEDBYSOLIDACTORS, AActor, flags6), DEFINE_FLAG(MF6, NOMENU, AActor, flags6), DEFINE_FLAG(MF6, SEEINVISIBLE, AActor, flags6), + DEFINE_FLAG(MF6, DONTCORPSE, AActor, flags6), // Effect flags DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),