mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
- Changed PowerFlight so that Hexen's infiniteness is not controlled by being
in a hub but by a level flag instead. - Fixed: Floor and ceiling huggers must set themselves to floor and ceiling each time they move. - Added a LEVEL_NOMONSTERS flag so that G_ChangeLevel doesn't have to mess with the dmflags CVAR to start the level without monsters. SVN r563 (trunk)
This commit is contained in:
parent
8f5dd5d028
commit
621fe2ed98
13 changed files with 60 additions and 14 deletions
|
@ -1,3 +1,11 @@
|
|||
November 8, 2007 (Changes by Graf Zahl)
|
||||
- Changed PowerFlight so that Hexen's infiniteness is not controlled by being
|
||||
in a hub but by a level flag instead.
|
||||
|
||||
November 7, 2007 (Changes by Graf Zahl)
|
||||
- Added a LEVEL_NOMONSTERS flag so that G_ChangeLevel doesn't have to mess with
|
||||
the dmflags CVAR to start the level without monsters.
|
||||
|
||||
November 4, 2007 (Changes by Graf Zahl)
|
||||
- Fixed: Backpacks didn't increase the ammo capacity to BackpackMaxAmount if
|
||||
an ammo type's BackpackAmount was 0.
|
||||
|
|
|
@ -199,7 +199,7 @@ void A_PotteryExplode (AActor *actor)
|
|||
S_Sound (mo, CHAN_BODY, "PotteryExplode", 1, ATTN_NORM);
|
||||
if (actor->args[0]>=0 && actor->args[0]<=255 && SpawnableThings[actor->args[0]])
|
||||
{ // Spawn an item
|
||||
if (!(dmflags & DF_NO_MONSTERS)
|
||||
if (!((level.flags & LEVEL_NOMONSTERS) || (dmflags & DF_NO_MONSTERS))
|
||||
|| !(GetDefaultByType (SpawnableThings[actor->args[0]])->flags3 & MF3_ISMONSTER))
|
||||
{ // Only spawn monsters if not -nomonsters
|
||||
Spawn (SpawnableThings[actor->args[0]],
|
||||
|
@ -732,7 +732,7 @@ void A_SoAExplode (AActor *actor)
|
|||
}
|
||||
if (actor->args[0]>=0 && actor->args[0]<=255 && SpawnableThings[actor->args[0]])
|
||||
{ // Spawn an item
|
||||
if (!(dmflags & DF_NO_MONSTERS)
|
||||
if (!((level.flags & LEVEL_NOMONSTERS) || (dmflags & DF_NO_MONSTERS))
|
||||
|| !(GetDefaultByType (SpawnableThings[actor->args[0]])->flags3 & MF3_ISMONSTER))
|
||||
{ // Only spawn monsters if not -nomonsters
|
||||
Spawn (SpawnableThings[actor->args[0]],
|
||||
|
|
|
@ -295,6 +295,8 @@ static const char *MapInfoMapLevel[] =
|
|||
"noinfighting",
|
||||
"normalinfighting",
|
||||
"totalinfighting",
|
||||
"infiniteflightpowerup",
|
||||
"noinfiniteflightpowerup",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -433,6 +435,8 @@ MapHandlers[] =
|
|||
{ MITYPE_SCFLAGS, LEVEL_NOINFIGHTING, ~LEVEL_TOTALINFIGHTING },
|
||||
{ MITYPE_SCFLAGS, 0, ~(LEVEL_NOINFIGHTING|LEVEL_TOTALINFIGHTING)},
|
||||
{ MITYPE_SCFLAGS, LEVEL_TOTALINFIGHTING, ~LEVEL_NOINFIGHTING },
|
||||
{ MITYPE_SETFLAG, LEVEL_INFINITE_FLIGHT, 0 },
|
||||
{ MITYPE_CLRFLAG, LEVEL_INFINITE_FLIGHT, 0 },
|
||||
};
|
||||
|
||||
static const char *MapInfoClusterLevel[] =
|
||||
|
@ -619,7 +623,8 @@ static void G_DoParseMapInfo (int lump)
|
|||
| LEVEL_SNDSEQTOTALCTRL
|
||||
| LEVEL_FALLDMG_HX
|
||||
| LEVEL_ACTOWNSPECIAL
|
||||
| LEVEL_MISSILESACTIVATEIMPACT;
|
||||
| LEVEL_MISSILESACTIVATEIMPACT
|
||||
| LEVEL_INFINITE_FLIGHT;
|
||||
}
|
||||
levelindex = FindWadLevelInfo (sc_String);
|
||||
if (levelindex == -1)
|
||||
|
@ -1643,6 +1648,7 @@ extern int NoWipe; // [RH] Don't wipe when travelling in hubs
|
|||
static bool startkeepfacing; // [RH] Support for keeping your facing angle
|
||||
static bool resetinventory; // Reset the inventory to the player's default for the next level
|
||||
static bool unloading;
|
||||
static bool g_nomonsters;
|
||||
|
||||
// [RH] The position parameter to these next three functions should
|
||||
// match the first parameter of the single player start spots
|
||||
|
@ -1671,8 +1677,7 @@ void G_ChangeLevel(const char * levelname, int position, bool keepFacing, int ne
|
|||
|
||||
if (nextSkill != -1) NextSkill = nextSkill;
|
||||
|
||||
if (!nomonsters) dmflags = dmflags & ~DF_NO_MONSTERS;
|
||||
else dmflags = dmflags | DF_NO_MONSTERS;
|
||||
g_nomonsters = nomonsters;
|
||||
|
||||
if (nointermission) level.flags |= LEVEL_NOINTERMISSION;
|
||||
|
||||
|
@ -1959,6 +1964,15 @@ void G_DoLoadLevel (int position, bool autosave)
|
|||
players[i].fragcount = 0;
|
||||
}
|
||||
|
||||
if (g_nomonsters)
|
||||
{
|
||||
level.flags |= LEVEL_NOMONSTERS;
|
||||
}
|
||||
else
|
||||
{
|
||||
level.flags &= ~LEVEL_NOMONSTERS;
|
||||
}
|
||||
|
||||
P_SetupLevel (level.mapname, position);
|
||||
|
||||
// [RH] Start lightning, if MAPINFO tells us to
|
||||
|
|
|
@ -110,6 +110,9 @@
|
|||
#define LEVEL_TOTALINFIGHTING UCONST64(0x400000000000)
|
||||
#define LEVEL_NOINFIGHTING UCONST64(0x800000000000)
|
||||
|
||||
#define LEVEL_NOMONSTERS UCONST64(0x1000000000000)
|
||||
#define LEVEL_INFINITE_FLIGHT UCONST64(0x2000000000000)
|
||||
|
||||
struct acsdefered_s;
|
||||
|
||||
struct FSpecialAction
|
||||
|
|
|
@ -973,7 +973,7 @@ void APowerFlight::InitEffect ()
|
|||
void APowerFlight::Tick ()
|
||||
{
|
||||
// The Wings of Wrath only expire in multiplayer and non-hub games
|
||||
if (!multiplayer && (level.clusterflags & CLUSTER_HUB))
|
||||
if (!multiplayer && (level.flags & LEVEL_INFINITE_FLIGHT))
|
||||
{
|
||||
EffectTics++;
|
||||
}
|
||||
|
|
|
@ -404,12 +404,12 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
if (bglobal.freeze)
|
||||
{
|
||||
bglobal.freeze = false;
|
||||
msg = "Freeze mode off\n";
|
||||
msg = "Freeze mode off";
|
||||
}
|
||||
else
|
||||
{
|
||||
bglobal.freeze = true;
|
||||
msg = "Freeze mode on\n";
|
||||
msg = "Freeze mode on";
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -737,6 +737,7 @@ FBehavior::FBehavior (int lumpnum, FileReader * fr, int len)
|
|||
|
||||
if (object[0] != 'A' || object[1] != 'C' || object[2] != 'S')
|
||||
{
|
||||
delete[] object;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -752,6 +753,7 @@ FBehavior::FBehavior (int lumpnum, FileReader * fr, int len)
|
|||
Format = ACS_LittleEnhanced;
|
||||
break;
|
||||
default:
|
||||
delete[] object;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1613,6 +1613,15 @@ bool P_TryMove (AActor *thing, fixed_t x, fixed_t y,
|
|||
}
|
||||
}
|
||||
|
||||
if (thing->flags3 & MF3_FLOORHUGGER)
|
||||
{
|
||||
thing->z = tmfloorz;
|
||||
}
|
||||
else if (thing->flags3 & MF3_CEILINGHUGGER)
|
||||
{
|
||||
thing->z = tmceilingz - thing->height;
|
||||
}
|
||||
|
||||
if (onfloor && tmfloorsector == thing->floorsector)
|
||||
{
|
||||
thing->z = tmfloorz;
|
||||
|
|
|
@ -3856,7 +3856,7 @@ void P_SpawnMapThing (mapthing2_t *mthing, int position)
|
|||
}
|
||||
|
||||
// don't spawn any monsters if -nomonsters
|
||||
if (dmflags & DF_NO_MONSTERS && info->flags3 & MF3_ISMONSTER )
|
||||
if (((level.flags & LEVEL_NOMONSTERS) || (dmflags & DF_NO_MONSTERS)) && info->flags3 & MF3_ISMONSTER )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -67,7 +67,8 @@ bool P_Thing_Spawn (int tid, AActor *source, int type, angle_t angle, bool fog,
|
|||
// Handle decorate replacements.
|
||||
kind = kind->ActorInfo->GetReplacement()->Class;
|
||||
|
||||
if ((GetDefaultByType (kind)->flags3 & MF3_ISMONSTER) && (dmflags & DF_NO_MONSTERS))
|
||||
if ((GetDefaultByType (kind)->flags3 & MF3_ISMONSTER) &&
|
||||
((dmflags & DF_NO_MONSTERS) || (level.flags & LEVEL_NOMONSTERS)))
|
||||
return false;
|
||||
|
||||
if (tid == 0)
|
||||
|
@ -202,7 +203,8 @@ bool P_Thing_Projectile (int tid, AActor *source, int type, const char * type_na
|
|||
kind = kind->ActorInfo->GetReplacement()->Class;
|
||||
|
||||
defflags3 = GetDefaultByType (kind)->flags3;
|
||||
if ((defflags3 & MF3_ISMONSTER) && (dmflags & DF_NO_MONSTERS))
|
||||
if ((defflags3 & MF3_ISMONSTER) &&
|
||||
((dmflags & DF_NO_MONSTERS) || (level.flags & LEVEL_NOMONSTERS)))
|
||||
return false;
|
||||
|
||||
if (tid == 0)
|
||||
|
|
|
@ -16,7 +16,7 @@ skill normal
|
|||
Name "MNU_BRINGEST"
|
||||
|
||||
skill hard
|
||||
SpawnFilter "Normal"
|
||||
SpawnFilter "Hard"
|
||||
Name "MNU_SMITE"
|
||||
|
||||
skill nightmare
|
||||
|
|
|
@ -27,7 +27,7 @@ skill normal
|
|||
PlayerClassName "mage" "MNU_SORCERER"
|
||||
|
||||
skill hard
|
||||
SpawnFilter "Normal"
|
||||
SpawnFilter "Hard"
|
||||
Name "MNU_SMITE"
|
||||
PlayerClassName "fighter" "MNU_BERSERKER"
|
||||
PlayerClassName "cleric" "MNU_CARDINAL"
|
||||
|
@ -73,6 +73,14 @@ exittextislump
|
|||
music hub
|
||||
pic interpic
|
||||
|
||||
defaultmap
|
||||
activateowndeathspecials
|
||||
infiniteflightpowerup
|
||||
fallingdamage
|
||||
nointermission
|
||||
noautosequences
|
||||
missilesactivateimpactlines
|
||||
|
||||
// There is also support for showing a clus5msg after cluster 5, but
|
||||
// since it isn't used, and it would intefere with the finale if I
|
||||
// included it here, I'm leaving out the clusterdef for cluster 5.
|
||||
|
|
|
@ -19,7 +19,7 @@ skill normal
|
|||
Key v
|
||||
|
||||
skill hard
|
||||
SpawnFilter "Normal"
|
||||
SpawnFilter "Hard"
|
||||
PicName "M_ULTRA"
|
||||
Key e
|
||||
|
||||
|
|
Loading…
Reference in a new issue