diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 581b89ae3..eeaa18145 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -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. diff --git a/src/g_hexen/a_hexenspecialdecs.cpp b/src/g_hexen/a_hexenspecialdecs.cpp index 471cca509..b845d1c98 100644 --- a/src/g_hexen/a_hexenspecialdecs.cpp +++ b/src/g_hexen/a_hexenspecialdecs.cpp @@ -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]], diff --git a/src/g_level.cpp b/src/g_level.cpp index 2f9634c44..55e63d564 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -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 diff --git a/src/g_level.h b/src/g_level.h index 85a456264..c5f413509 100644 --- a/src/g_level.h +++ b/src/g_level.h @@ -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 diff --git a/src/g_shared/a_artifacts.cpp b/src/g_shared/a_artifacts.cpp index 5de1f7e4e..8a92be633 100644 --- a/src/g_shared/a_artifacts.cpp +++ b/src/g_shared/a_artifacts.cpp @@ -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++; } diff --git a/src/m_cheat.cpp b/src/m_cheat.cpp index d81496eee..9d0041c6f 100644 --- a/src/m_cheat.cpp +++ b/src/m_cheat.cpp @@ -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; } diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 95793bc76..2f1194c10 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -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; } diff --git a/src/p_map.cpp b/src/p_map.cpp index 7b5601e16..665c72824 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -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; diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 5282916d3..a5817a003 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -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; } diff --git a/src/p_things.cpp b/src/p_things.cpp index 012c3dc00..3d38d8719 100644 --- a/src/p_things.cpp +++ b/src/p_things.cpp @@ -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) diff --git a/wadsrc/mapinfo/heretic.txt b/wadsrc/mapinfo/heretic.txt index 0c911de3f..2ceeaef82 100644 --- a/wadsrc/mapinfo/heretic.txt +++ b/wadsrc/mapinfo/heretic.txt @@ -16,7 +16,7 @@ skill normal Name "MNU_BRINGEST" skill hard - SpawnFilter "Normal" + SpawnFilter "Hard" Name "MNU_SMITE" skill nightmare diff --git a/wadsrc/mapinfo/hexen.txt b/wadsrc/mapinfo/hexen.txt index b9563b1f1..d106e9eb9 100644 --- a/wadsrc/mapinfo/hexen.txt +++ b/wadsrc/mapinfo/hexen.txt @@ -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. diff --git a/wadsrc/mapinfo/strife.txt b/wadsrc/mapinfo/strife.txt index a6f9ace35..fa98e667b 100644 --- a/wadsrc/mapinfo/strife.txt +++ b/wadsrc/mapinfo/strife.txt @@ -19,7 +19,7 @@ skill normal Key v skill hard - SpawnFilter "Normal" + SpawnFilter "Hard" PicName "M_ULTRA" Key e