- 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
int SpawnHealth();
int GibHealth();
// Check for monsters that count as kill but excludes all friendlies.
bool CountsAsKill() const

View File

@ -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);

View File

@ -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);

View File

@ -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")

View File

@ -75,6 +75,7 @@ struct gameinfo_t
bool drawreadthis;
bool noloopfinalemusic;
bool intermissioncounter;
bool nightmarefast;
TArray<FName> creditPages;
TArray<FName> finalePages;
TArray<FName> 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;
};

View File

@ -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);
}
//=============================================================================

View File

@ -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.)

View File

@ -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);
}

View File

@ -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

View File

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

View File

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

View File

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

View File

@ -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

View File

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