From 388f09f786d5ab3927d3bb6d76895b043a18bdb6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 14 May 2014 12:54:03 +0200 Subject: [PATCH] - fixed: In Heretic corpses do not get crunched to gibs, they just get their size reduced to 0. Handled by a new gameinfo flag. This also gets set for Chex quest which has the gib sprite replaced by something different. Using a Crush state will override this global flag. --- src/gi.cpp | 1 + src/gi.h | 1 + src/p_mobj.cpp | 10 ++++++++++ wadsrc/static/mapinfo/chex.txt | 1 + wadsrc/static/mapinfo/heretic.txt | 1 + 5 files changed, 14 insertions(+) diff --git a/src/gi.cpp b/src/gi.cpp index 8ab9358544..4e64dd4256 100644 --- a/src/gi.cpp +++ b/src/gi.cpp @@ -323,6 +323,7 @@ void FMapInfoParser::ParseGameInfo() GAMEINFOKEY_BOOL(noloopfinalemusic, "noloopfinalemusic") GAMEINFOKEY_BOOL(drawreadthis, "drawreadthis") GAMEINFOKEY_BOOL(swapmenu, "swapmenu") + GAMEINFOKEY_BOOL(dontcrunchcorpses, "dontcrunchcorpses") GAMEINFOKEY_BOOL(intermissioncounter, "intermissioncounter") GAMEINFOKEY_BOOL(nightmarefast, "nightmarefast") GAMEINFOKEY_COLOR(dimcolor, "dimcolor") diff --git a/src/gi.h b/src/gi.h index a1a03b2dee..bbfbe73ff6 100644 --- a/src/gi.h +++ b/src/gi.h @@ -113,6 +113,7 @@ struct gameinfo_t bool intermissioncounter; bool nightmarefast; bool swapmenu; + bool dontcrunchcorpses; TArray creditPages; TArray finalePages; TArray infoPages; diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index c6a7fd35c4..72679ef719 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -1010,6 +1010,16 @@ bool AActor::Grind(bool items) if ((flags & MF_CORPSE) && !(flags3 & MF3_DONTGIB) && (health <= 0)) { FState * state = FindState(NAME_Crush); + + // In Heretic and Chex Quest we don't change the actor's sprite, just its size. + if (state == NULL && gameinfo.dontcrunchcorpses) + { + flags &= ~MF_SOLID; + flags3 |= MF3_DONTGIB; + height = radius = 0; + return false; + } + bool isgeneric = false; // ZDoom behavior differs from standard as crushed corpses cannot be raised. // The reason for the change was originally because of a problem with players, diff --git a/wadsrc/static/mapinfo/chex.txt b/wadsrc/static/mapinfo/chex.txt index edc5b4f293..e29eeeb4de 100644 --- a/wadsrc/static/mapinfo/chex.txt +++ b/wadsrc/static/mapinfo/chex.txt @@ -40,6 +40,7 @@ gameinfo definventorymaxamount = 25 defaultrespawntime = 12 defaultdropstyle = 1 + dontcrunchcorpses = 1 endoom = "ENDOOM" player5start = 4001 drawreadthis = true diff --git a/wadsrc/static/mapinfo/heretic.txt b/wadsrc/static/mapinfo/heretic.txt index 196e81c502..d372466f5b 100644 --- a/wadsrc/static/mapinfo/heretic.txt +++ b/wadsrc/static/mapinfo/heretic.txt @@ -56,6 +56,7 @@ gameinfo nightmarefast = true pausesign = "PAUSED" gibfactor = 0.5 + dontcrunchcorpses = true cursorpic = "herecurs" textscreenx = 20 textscreeny = 5