diff --git a/src/actor.h b/src/actor.h index e089de96ac..79358148fe 100644 --- a/src/actor.h +++ b/src/actor.h @@ -704,6 +704,7 @@ public: // Return starting health adjusted by skill level int SpawnHealth(); + int GibHealth(); // Check for monsters that count as kill but excludes all friendlies. bool CountsAsKill() const diff --git a/src/d_main.cpp b/src/d_main.cpp index cbed77f800..d24b8c57d4 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -785,7 +785,7 @@ void D_Display () FTexture *tex; int x; - tex = TexMan[gameinfo.gametype & (GAME_DoomStrifeChex) ? "M_PAUSE" : "PAUSED"]; + tex = TexMan[gameinfo.PauseSign]; x = (SCREENWIDTH - tex->GetScaledWidth() * CleanXfac)/2 + tex->GetScaledLeftOffset() * CleanXfac; screen->DrawTexture (tex, x, 4, DTA_CleanNoMove, true, TAG_DONE); diff --git a/src/g_shared/a_keys.cpp b/src/g_shared/a_keys.cpp index 1169acb885..aaddb9084a 100644 --- a/src/g_shared/a_keys.cpp +++ b/src/g_shared/a_keys.cpp @@ -424,10 +424,10 @@ bool P_CheckKeys (AActor *owner, int keynum, bool remote) if (!locks[keynum]) { - if (keynum == 103 && gameinfo.gametype == GAME_Strife) - failtext = "THIS AREA IS ONLY AVAILABLE IN THE RETAIL VERSION OF STRIFE"; + if (keynum == 103 && (gameinfo.flags & GI_SHAREWARE)) + failtext = "$TXT_RETAIL_ONLY"; else - failtext = "That doesn't seem to work"; + failtext = "$TXT_DOES_NOT_WORK"; failsound = failage; numfailsounds = countof(failage); diff --git a/src/gi.cpp b/src/gi.cpp index 0a3f51dbb5..4cd1284c96 100644 --- a/src/gi.cpp +++ b/src/gi.cpp @@ -260,9 +260,11 @@ void FMapInfoParser::ParseGameInfo() GAMEINFOKEY_CSTRING(finaleFlat, "finaleFlat", 8) GAMEINFOKEY_STRINGARRAY(finalePages, "finalePage", 8) GAMEINFOKEY_STRINGARRAY(infoPages, "infoPage", 8) + GAMEINFOKEY_CSTRING(PauseSign, "pausesign", 8) GAMEINFOKEY_STRING(quitSound, "quitSound") GAMEINFOKEY_CSTRING(borderFlat, "borderFlat", 8) GAMEINFOKEY_FIXED(telefogheight, "telefogheight") + GAMEINFOKEY_FIXED(gibfactor, "gibfactor") GAMEINFOKEY_INT(defKickback, "defKickback") GAMEINFOKEY_CSTRING(SkyFlatName, "SkyFlatName", 8) GAMEINFOKEY_STRING(translator, "translator") @@ -275,6 +277,7 @@ void FMapInfoParser::ParseGameInfo() GAMEINFOKEY_BOOL(noloopfinalemusic, "noloopfinalemusic") GAMEINFOKEY_BOOL(drawreadthis, "drawreadthis") GAMEINFOKEY_BOOL(intermissioncounter, "intermissioncounter") + GAMEINFOKEY_BOOL(nightmarefast, "nightmarefast") GAMEINFOKEY_COLOR(dimcolor, "dimcolor") GAMEINFOKEY_FLOAT(dimamount, "dimamount") GAMEINFOKEY_INT(definventorymaxamount, "definventorymaxamount") diff --git a/src/gi.h b/src/gi.h index df50060a9a..483b4a1b0e 100644 --- a/src/gi.h +++ b/src/gi.h @@ -75,6 +75,7 @@ struct gameinfo_t bool drawreadthis; bool noloopfinalemusic; bool intermissioncounter; + bool nightmarefast; TArray creditPages; TArray finalePages; TArray infoPages; @@ -92,6 +93,7 @@ struct gameinfo_t char SkyFlatName[9]; char ArmorIcon1[9]; char ArmorIcon2[9]; + char PauseSign[9]; char Endoom[9]; fixed_t Armor2Percent; FString quitSound; @@ -120,6 +122,7 @@ struct gameinfo_t FName mFontColorHighlight; FName mFontColorSelection; char mBackButton[9]; + fixed_t gibfactor; const char *GetFinalePage(unsigned int num) const; }; diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 1a3de085af..378aaae9dd 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -2166,10 +2166,13 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi if (nightmarefast && G_SkillProperty(SKILLP_FastMonsters)) { // Monsters move faster in nightmare mode - actor->tics -= actor->tics / 2; - if (actor->tics < 3) + if (actor->tics > 3) { - actor->tics = 3; + actor->tics -= actor->tics / 2; + if (actor->tics < 3) + { + actor->tics = 3; + } } } @@ -2648,7 +2651,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Chase) } else // this is the old default A_Chase { - A_DoChase (self, false, self->MeleeState, self->MissileState, true, !!(gameinfo.gametype & GAME_Raven), false); + A_DoChase (self, false, self->MeleeState, self->MissileState, true, gameinfo.nightmarefast, false); } } @@ -2660,7 +2663,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FastChase) DEFINE_ACTION_FUNCTION(AActor, A_VileChase) { if (!P_CheckForResurrection(self, true)) - A_DoChase (self, false, self->MeleeState, self->MissileState, true, !!(gameinfo.gametype & GAME_Raven), false); + A_DoChase (self, false, self->MeleeState, self->MissileState, true, gameinfo.nightmarefast, false); } DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ExtChase) @@ -2680,7 +2683,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ExtChase) // for internal use void A_Chase(AActor *self) { - A_DoChase (self, false, self->MeleeState, self->MissileState, true, !!(gameinfo.gametype & GAME_Raven), false); + A_DoChase (self, false, self->MeleeState, self->MissileState, true, gameinfo.nightmarefast, false); } //============================================================================= diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index d4db864361..93bb0c4412 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -318,20 +318,10 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker) // EXTERN_CVAR (Int, fraglimit) -static int GibHealth(AActor *actor) -{ - return -abs( - actor->GetClass()->Meta.GetMetaInt ( - AMETA_GibHealth, - gameinfo.gametype & GAME_DoomChex ? - -actor->SpawnHealth() : - -actor->SpawnHealth()/2)); -} - void AActor::Die (AActor *source, AActor *inflictor) { // Handle possible unmorph on death - bool wasgibbed = (health < GibHealth(this)); + bool wasgibbed = (health < GibHealth()); AActor *realthis = NULL; int realstyle = 0; @@ -342,7 +332,7 @@ void AActor::Die (AActor *source, AActor *inflictor) { if (wasgibbed) { - int realgibhealth = GibHealth(realthis); + int realgibhealth = realthis->GibHealth(); if (realthis->health >= realgibhealth) { realthis->health = realgibhealth -1; // if morphed was gibbed, so must original be (where allowed) @@ -670,7 +660,7 @@ void AActor::Die (AActor *source, AActor *inflictor) { int flags4 = inflictor == NULL ? 0 : inflictor->flags4; - int gibhealth = GibHealth(this); + int gibhealth = GibHealth(); // Don't pass on a damage type this actor cannot handle. // (most importantly, prevent barrels from passing on ice damage.) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index f12127a750..d1f0345d85 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -5509,6 +5509,11 @@ int AActor::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FN return (death == NULL) ? -1 : damage; } +int AActor::GibHealth() +{ + return -abs(GetClass()->Meta.GetMetaInt (AMETA_GibHealth, FixedMul(SpawnHealth(), gameinfo.gibfactor))); +} + void AActor::Crash() { if (((flags & MF_CORPSE) || (flags6 & MF6_KILLED)) && @@ -5523,10 +5528,7 @@ void AActor::Crash() } if (crashstate == NULL) { - int gibhealth = -abs(GetClass()->Meta.GetMetaInt (AMETA_GibHealth, - gameinfo.gametype & GAME_DoomChex ? -SpawnHealth() : -SpawnHealth()/2)); - - if (health < gibhealth) + if (health < GibHealth()) { // Extreme death crashstate = FindState (NAME_Crash, NAME_Extreme); } diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index 5f0eff88e3..dd097672ff 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -1328,6 +1328,8 @@ TXT_NEED_SILVERKEY = "You need the Silver Key"; TXT_NEED_BRASSKEY = "You need the Brass Key"; TXT_NEED_REDCRYSTAL = "You need the Red Crystal"; TXT_NEED_BLUECRYSTAL = "You need the Blue Crystal"; +TXT_RETAIL_ONLY = "THIS AREA IS ONLY AVAILABLE IN THE RETAIL VERSION OF STRIFE"; +TXT_DOES_NOT_WORK = "That doesn't seem to work"; // Strife Quest messages diff --git a/wadsrc/static/mapinfo/chex.txt b/wadsrc/static/mapinfo/chex.txt index 0dac3e7c99..2f2d77bf7c 100644 --- a/wadsrc/static/mapinfo/chex.txt +++ b/wadsrc/static/mapinfo/chex.txt @@ -53,6 +53,8 @@ gameinfo menufontcolor_selection = "GOLD" menubackbutton = "M_BACK_H" playerclasses = "ChexPlayer" + pausesign = "M_PAUSE" + gibfactor = 1 } skill baby diff --git a/wadsrc/static/mapinfo/doomcommon.txt b/wadsrc/static/mapinfo/doomcommon.txt index 2a103d6a9f..a4d12b7c7f 100644 --- a/wadsrc/static/mapinfo/doomcommon.txt +++ b/wadsrc/static/mapinfo/doomcommon.txt @@ -53,6 +53,8 @@ gameinfo menufontcolor_selection = "BRICK" menubackbutton = "M_BACK_D" playerclasses = "DoomPlayer" + pausesign = "M_PAUSE" + gibfactor = 1 } skill baby diff --git a/wadsrc/static/mapinfo/heretic.txt b/wadsrc/static/mapinfo/heretic.txt index e6876ab2cc..1596f45d81 100644 --- a/wadsrc/static/mapinfo/heretic.txt +++ b/wadsrc/static/mapinfo/heretic.txt @@ -52,6 +52,9 @@ gameinfo menufontcolor_selection = "DARKGREEN" menubackbutton = "M_BACK_H" playerclasses = "HereticPlayer" + nightmarefast = true + pausesign = "PAUSED" + gibfactor = 0.5 } skill baby diff --git a/wadsrc/static/mapinfo/hexen.txt b/wadsrc/static/mapinfo/hexen.txt index 46682b56f3..af6528699b 100644 --- a/wadsrc/static/mapinfo/hexen.txt +++ b/wadsrc/static/mapinfo/hexen.txt @@ -50,6 +50,9 @@ gameinfo menufontcolor_selection = "BRICK" menubackbutton = "M_BACK_X" PlayerClasses = "FighterPlayer", "ClericPlayer", "MagePlayer" + nightmarefast = true + pausesign = "PAUSED" + gibfactor = 0.5 } skill baby diff --git a/wadsrc/static/mapinfo/strife.txt b/wadsrc/static/mapinfo/strife.txt index edfe798e64..8595c56c96 100644 --- a/wadsrc/static/mapinfo/strife.txt +++ b/wadsrc/static/mapinfo/strife.txt @@ -53,6 +53,8 @@ gameinfo menufontcolor_selection = "GOLD" menubackbutton = "M_BACK_S" PlayerClasses = "StrifePlayer" + pausesign = "PAUSED" + gibfactor = 0.5 } skill baby