- moved some info into the GAMEINFO section:

* the sprite used for 'pause'.
 * the factor with which a monster's health is multiplied to decide if it's supposed to be gibbed,
 * the decision to make monsters run faster in nightmare mode.
- moved the hard coded lock messages for lock types 102 and 103 into the language lump.
- fixed: Raven's fast monsters could become slower in Nightmare if they had very short walking states.


SVN r2834 (trunk)
This commit is contained in:
Christoph Oelckers 2010-09-19 10:39:34 +00:00
parent 7dcf9b4738
commit 74525ab1d6
14 changed files with 43 additions and 27 deletions

View file

@ -704,6 +704,7 @@ public:
// Return starting health adjusted by skill level // Return starting health adjusted by skill level
int SpawnHealth(); int SpawnHealth();
int GibHealth();
// Check for monsters that count as kill but excludes all friendlies. // Check for monsters that count as kill but excludes all friendlies.
bool CountsAsKill() const bool CountsAsKill() const

View file

@ -785,7 +785,7 @@ void D_Display ()
FTexture *tex; FTexture *tex;
int x; int x;
tex = TexMan[gameinfo.gametype & (GAME_DoomStrifeChex) ? "M_PAUSE" : "PAUSED"]; tex = TexMan[gameinfo.PauseSign];
x = (SCREENWIDTH - tex->GetScaledWidth() * CleanXfac)/2 + x = (SCREENWIDTH - tex->GetScaledWidth() * CleanXfac)/2 +
tex->GetScaledLeftOffset() * CleanXfac; tex->GetScaledLeftOffset() * CleanXfac;
screen->DrawTexture (tex, x, 4, DTA_CleanNoMove, true, TAG_DONE); screen->DrawTexture (tex, x, 4, DTA_CleanNoMove, true, TAG_DONE);

View file

@ -424,10 +424,10 @@ bool P_CheckKeys (AActor *owner, int keynum, bool remote)
if (!locks[keynum]) if (!locks[keynum])
{ {
if (keynum == 103 && gameinfo.gametype == GAME_Strife) if (keynum == 103 && (gameinfo.flags & GI_SHAREWARE))
failtext = "THIS AREA IS ONLY AVAILABLE IN THE RETAIL VERSION OF STRIFE"; failtext = "$TXT_RETAIL_ONLY";
else else
failtext = "That doesn't seem to work"; failtext = "$TXT_DOES_NOT_WORK";
failsound = failage; failsound = failage;
numfailsounds = countof(failage); numfailsounds = countof(failage);

View file

@ -260,9 +260,11 @@ void FMapInfoParser::ParseGameInfo()
GAMEINFOKEY_CSTRING(finaleFlat, "finaleFlat", 8) GAMEINFOKEY_CSTRING(finaleFlat, "finaleFlat", 8)
GAMEINFOKEY_STRINGARRAY(finalePages, "finalePage", 8) GAMEINFOKEY_STRINGARRAY(finalePages, "finalePage", 8)
GAMEINFOKEY_STRINGARRAY(infoPages, "infoPage", 8) GAMEINFOKEY_STRINGARRAY(infoPages, "infoPage", 8)
GAMEINFOKEY_CSTRING(PauseSign, "pausesign", 8)
GAMEINFOKEY_STRING(quitSound, "quitSound") GAMEINFOKEY_STRING(quitSound, "quitSound")
GAMEINFOKEY_CSTRING(borderFlat, "borderFlat", 8) GAMEINFOKEY_CSTRING(borderFlat, "borderFlat", 8)
GAMEINFOKEY_FIXED(telefogheight, "telefogheight") GAMEINFOKEY_FIXED(telefogheight, "telefogheight")
GAMEINFOKEY_FIXED(gibfactor, "gibfactor")
GAMEINFOKEY_INT(defKickback, "defKickback") GAMEINFOKEY_INT(defKickback, "defKickback")
GAMEINFOKEY_CSTRING(SkyFlatName, "SkyFlatName", 8) GAMEINFOKEY_CSTRING(SkyFlatName, "SkyFlatName", 8)
GAMEINFOKEY_STRING(translator, "translator") GAMEINFOKEY_STRING(translator, "translator")
@ -275,6 +277,7 @@ void FMapInfoParser::ParseGameInfo()
GAMEINFOKEY_BOOL(noloopfinalemusic, "noloopfinalemusic") GAMEINFOKEY_BOOL(noloopfinalemusic, "noloopfinalemusic")
GAMEINFOKEY_BOOL(drawreadthis, "drawreadthis") GAMEINFOKEY_BOOL(drawreadthis, "drawreadthis")
GAMEINFOKEY_BOOL(intermissioncounter, "intermissioncounter") GAMEINFOKEY_BOOL(intermissioncounter, "intermissioncounter")
GAMEINFOKEY_BOOL(nightmarefast, "nightmarefast")
GAMEINFOKEY_COLOR(dimcolor, "dimcolor") GAMEINFOKEY_COLOR(dimcolor, "dimcolor")
GAMEINFOKEY_FLOAT(dimamount, "dimamount") GAMEINFOKEY_FLOAT(dimamount, "dimamount")
GAMEINFOKEY_INT(definventorymaxamount, "definventorymaxamount") GAMEINFOKEY_INT(definventorymaxamount, "definventorymaxamount")

View file

@ -75,6 +75,7 @@ struct gameinfo_t
bool drawreadthis; bool drawreadthis;
bool noloopfinalemusic; bool noloopfinalemusic;
bool intermissioncounter; bool intermissioncounter;
bool nightmarefast;
TArray<FName> creditPages; TArray<FName> creditPages;
TArray<FName> finalePages; TArray<FName> finalePages;
TArray<FName> infoPages; TArray<FName> infoPages;
@ -92,6 +93,7 @@ struct gameinfo_t
char SkyFlatName[9]; char SkyFlatName[9];
char ArmorIcon1[9]; char ArmorIcon1[9];
char ArmorIcon2[9]; char ArmorIcon2[9];
char PauseSign[9];
char Endoom[9]; char Endoom[9];
fixed_t Armor2Percent; fixed_t Armor2Percent;
FString quitSound; FString quitSound;
@ -120,6 +122,7 @@ struct gameinfo_t
FName mFontColorHighlight; FName mFontColorHighlight;
FName mFontColorSelection; FName mFontColorSelection;
char mBackButton[9]; char mBackButton[9];
fixed_t gibfactor;
const char *GetFinalePage(unsigned int num) const; const char *GetFinalePage(unsigned int num) const;
}; };

View file

@ -2166,10 +2166,13 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
if (nightmarefast && G_SkillProperty(SKILLP_FastMonsters)) if (nightmarefast && G_SkillProperty(SKILLP_FastMonsters))
{ // Monsters move faster in nightmare mode { // 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 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) DEFINE_ACTION_FUNCTION(AActor, A_VileChase)
{ {
if (!P_CheckForResurrection(self, true)) 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) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ExtChase)
@ -2680,7 +2683,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ExtChase)
// for internal use // for internal use
void A_Chase(AActor *self) 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);
} }
//============================================================================= //=============================================================================

View file

@ -318,20 +318,10 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker)
// //
EXTERN_CVAR (Int, fraglimit) 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) void AActor::Die (AActor *source, AActor *inflictor)
{ {
// Handle possible unmorph on death // Handle possible unmorph on death
bool wasgibbed = (health < GibHealth(this)); bool wasgibbed = (health < GibHealth());
AActor *realthis = NULL; AActor *realthis = NULL;
int realstyle = 0; int realstyle = 0;
@ -342,7 +332,7 @@ void AActor::Die (AActor *source, AActor *inflictor)
{ {
if (wasgibbed) if (wasgibbed)
{ {
int realgibhealth = GibHealth(realthis); int realgibhealth = realthis->GibHealth();
if (realthis->health >= realgibhealth) if (realthis->health >= realgibhealth)
{ {
realthis->health = realgibhealth -1; // if morphed was gibbed, so must original be (where allowed) 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 flags4 = inflictor == NULL ? 0 : inflictor->flags4;
int gibhealth = GibHealth(this); int gibhealth = GibHealth();
// Don't pass on a damage type this actor cannot handle. // Don't pass on a damage type this actor cannot handle.
// (most importantly, prevent barrels from passing on ice damage.) // (most importantly, prevent barrels from passing on ice damage.)

View file

@ -5509,6 +5509,11 @@ int AActor::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FN
return (death == NULL) ? -1 : damage; return (death == NULL) ? -1 : damage;
} }
int AActor::GibHealth()
{
return -abs(GetClass()->Meta.GetMetaInt (AMETA_GibHealth, FixedMul(SpawnHealth(), gameinfo.gibfactor)));
}
void AActor::Crash() void AActor::Crash()
{ {
if (((flags & MF_CORPSE) || (flags6 & MF6_KILLED)) && if (((flags & MF_CORPSE) || (flags6 & MF6_KILLED)) &&
@ -5523,10 +5528,7 @@ void AActor::Crash()
} }
if (crashstate == NULL) if (crashstate == NULL)
{ {
int gibhealth = -abs(GetClass()->Meta.GetMetaInt (AMETA_GibHealth, if (health < GibHealth())
gameinfo.gametype & GAME_DoomChex ? -SpawnHealth() : -SpawnHealth()/2));
if (health < gibhealth)
{ // Extreme death { // Extreme death
crashstate = FindState (NAME_Crash, NAME_Extreme); crashstate = FindState (NAME_Crash, NAME_Extreme);
} }

View file

@ -1328,6 +1328,8 @@ TXT_NEED_SILVERKEY = "You need the Silver Key";
TXT_NEED_BRASSKEY = "You need the Brass Key"; TXT_NEED_BRASSKEY = "You need the Brass Key";
TXT_NEED_REDCRYSTAL = "You need the Red Crystal"; TXT_NEED_REDCRYSTAL = "You need the Red Crystal";
TXT_NEED_BLUECRYSTAL = "You need the Blue 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 // Strife Quest messages

View file

@ -53,6 +53,8 @@ gameinfo
menufontcolor_selection = "GOLD" menufontcolor_selection = "GOLD"
menubackbutton = "M_BACK_H" menubackbutton = "M_BACK_H"
playerclasses = "ChexPlayer" playerclasses = "ChexPlayer"
pausesign = "M_PAUSE"
gibfactor = 1
} }
skill baby skill baby

View file

@ -53,6 +53,8 @@ gameinfo
menufontcolor_selection = "BRICK" menufontcolor_selection = "BRICK"
menubackbutton = "M_BACK_D" menubackbutton = "M_BACK_D"
playerclasses = "DoomPlayer" playerclasses = "DoomPlayer"
pausesign = "M_PAUSE"
gibfactor = 1
} }
skill baby skill baby

View file

@ -52,6 +52,9 @@ gameinfo
menufontcolor_selection = "DARKGREEN" menufontcolor_selection = "DARKGREEN"
menubackbutton = "M_BACK_H" menubackbutton = "M_BACK_H"
playerclasses = "HereticPlayer" playerclasses = "HereticPlayer"
nightmarefast = true
pausesign = "PAUSED"
gibfactor = 0.5
} }
skill baby skill baby

View file

@ -50,6 +50,9 @@ gameinfo
menufontcolor_selection = "BRICK" menufontcolor_selection = "BRICK"
menubackbutton = "M_BACK_X" menubackbutton = "M_BACK_X"
PlayerClasses = "FighterPlayer", "ClericPlayer", "MagePlayer" PlayerClasses = "FighterPlayer", "ClericPlayer", "MagePlayer"
nightmarefast = true
pausesign = "PAUSED"
gibfactor = 0.5
} }
skill baby skill baby

View file

@ -53,6 +53,8 @@ gameinfo
menufontcolor_selection = "GOLD" menufontcolor_selection = "GOLD"
menubackbutton = "M_BACK_S" menubackbutton = "M_BACK_S"
PlayerClasses = "StrifePlayer" PlayerClasses = "StrifePlayer"
pausesign = "PAUSED"
gibfactor = 0.5
} }
skill baby skill baby