mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- workaround to allow playing SW's Last Warrior mod in one go.
This disables the boss's death in L4 ending the game and just advances to the next level. This seems to be the intent with this mod as the second episode starting at L5 is not defined and the first episode's subtitle advertises the full game.
This commit is contained in:
parent
1a5a2aba2b
commit
1fde9f2173
7 changed files with 19 additions and 4 deletions
|
@ -645,6 +645,7 @@ MapFlagHandlers[] =
|
||||||
{ "sw_bossmeter_sumo", MITYPE_SETFLAGG,LEVEL_SW_BOSSMETER_SUMO, 0, GAMEFLAG_SW },
|
{ "sw_bossmeter_sumo", MITYPE_SETFLAGG,LEVEL_SW_BOSSMETER_SUMO, 0, GAMEFLAG_SW },
|
||||||
{ "sw_bossmeter_zilla", MITYPE_SETFLAGG,LEVEL_SW_BOSSMETER_ZILLA, 0, GAMEFLAG_SW },
|
{ "sw_bossmeter_zilla", MITYPE_SETFLAGG,LEVEL_SW_BOSSMETER_ZILLA, 0, GAMEFLAG_SW },
|
||||||
{ "sw_deathexit_serpent", MITYPE_SETFLAGG,LEVEL_SW_DEATHEXIT_SERPENT, 0, GAMEFLAG_SW },
|
{ "sw_deathexit_serpent", MITYPE_SETFLAGG,LEVEL_SW_DEATHEXIT_SERPENT, 0, GAMEFLAG_SW },
|
||||||
|
{ "sw_deathexit_serpent_next", MITYPE_SETFLAGG,LEVEL_SW_DEATHEXIT_SERPENT | LEVEL_SW_DEATHEXIT_SERPENT_NEXT, 0, GAMEFLAG_SW },
|
||||||
{ "sw_deathexit_sumo", MITYPE_SETFLAGG,LEVEL_SW_DEATHEXIT_SUMO, 0, GAMEFLAG_SW },
|
{ "sw_deathexit_sumo", MITYPE_SETFLAGG,LEVEL_SW_DEATHEXIT_SUMO, 0, GAMEFLAG_SW },
|
||||||
{ "sw_deathexit_zilla", MITYPE_SETFLAGG,LEVEL_SW_DEATHEXIT_ZILLA, 0, GAMEFLAG_SW },
|
{ "sw_deathexit_zilla", MITYPE_SETFLAGG,LEVEL_SW_DEATHEXIT_ZILLA, 0, GAMEFLAG_SW },
|
||||||
{ "sw_spawnmines", MITYPE_SETFLAGG,LEVEL_SW_SPAWNMINES, 0, GAMEFLAG_SW },
|
{ "sw_spawnmines", MITYPE_SETFLAGG,LEVEL_SW_SPAWNMINES, 0, GAMEFLAG_SW },
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "c_dispatch.h"
|
#include "c_dispatch.h"
|
||||||
#include "md4.h"
|
#include "md4.h"
|
||||||
#include "hw_sections.h"
|
#include "hw_sections.h"
|
||||||
|
#include "mapinfo.h"
|
||||||
|
|
||||||
static TArray<usermaphack_t> usermaphacks;
|
static TArray<usermaphack_t> usermaphacks;
|
||||||
TArray<int> blockingpairs[MAXWALLS];
|
TArray<int> blockingpairs[MAXWALLS];
|
||||||
|
@ -249,6 +250,10 @@ static int32_t LoadMapHack(const char *filename)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (sc.Compare("sw_serp_continue")) // This is a hack for SW's Last Warrior mod to continue from L4 to L5.
|
||||||
|
{
|
||||||
|
currentLevel->gameflags |= LEVEL_SW_DEATHEXIT_SERPENT_NEXT;
|
||||||
|
}
|
||||||
|
|
||||||
else if (sc.Compare("angleoff") || sc.Compare("angoff"))
|
else if (sc.Compare("angleoff") || sc.Compare("angoff"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,6 +71,7 @@ CCMD(listmaps)
|
||||||
|
|
||||||
MapRecord *FindMapByName(const char *nm)
|
MapRecord *FindMapByName(const char *nm)
|
||||||
{
|
{
|
||||||
|
if (!nm || !*nm) return nullptr;
|
||||||
for (auto& map : mapList)
|
for (auto& map : mapList)
|
||||||
{
|
{
|
||||||
if (map->labelName.CompareNoCase(nm) == 0)
|
if (map->labelName.CompareNoCase(nm) == 0)
|
||||||
|
|
|
@ -51,8 +51,9 @@ enum EMapGameFlags
|
||||||
LEVEL_SW_DEATHEXIT_SERPENT = 1024,
|
LEVEL_SW_DEATHEXIT_SERPENT = 1024,
|
||||||
LEVEL_SW_DEATHEXIT_SUMO = 2048,
|
LEVEL_SW_DEATHEXIT_SUMO = 2048,
|
||||||
LEVEL_SW_DEATHEXIT_ZILLA = 4096,
|
LEVEL_SW_DEATHEXIT_ZILLA = 4096,
|
||||||
|
LEVEL_SW_DEATHEXIT_SERPENT_NEXT = 8192,
|
||||||
|
|
||||||
LEVEL_WT_BOSSSPAWN = 8192,
|
LEVEL_WT_BOSSSPAWN = 16384,
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -7202,7 +7202,7 @@ domovethings(void)
|
||||||
{
|
{
|
||||||
FinishTimer = 0;
|
FinishTimer = 0;
|
||||||
MapRecord *map = nullptr;
|
MapRecord *map = nullptr;
|
||||||
if (FinishAnim == ANIM_SUMO)
|
if (FinishAnim == ANIM_SUMO || FinishAnim == ANIM_SERP)
|
||||||
{
|
{
|
||||||
map = FindNextMap(currentLevel);
|
map = FindNextMap(currentLevel);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5327,8 +5327,13 @@ ActorHealth(short SpriteNum, short amt)
|
||||||
if (u->Health < u->MaxHealth/2)
|
if (u->Health < u->MaxHealth/2)
|
||||||
{
|
{
|
||||||
FinishAnim = ANIM_SERP;
|
FinishAnim = ANIM_SERP;
|
||||||
ChangeLevel(nullptr, g_nextskill);
|
// Hack for Last Warrior which apparently needs to continue with the next level here.
|
||||||
return true;
|
if (!(currentLevel->gameflags & LEVEL_SW_DEATHEXIT_SERPENT_NEXT))
|
||||||
|
{
|
||||||
|
ChangeLevel(nullptr, g_nextskill);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else FinishTimer = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
// SW's Last Warrior level 4. Do not make the serpent's death end the game. The menu has no second episode so this needs to continue.
|
||||||
|
sw_serp_continue
|
Loading…
Reference in a new issue