- 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:
Christoph Oelckers 2021-07-26 00:58:00 +02:00
parent 1a5a2aba2b
commit 1fde9f2173
7 changed files with 19 additions and 4 deletions

View file

@ -645,6 +645,7 @@ MapFlagHandlers[] =
{ "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_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_zilla", MITYPE_SETFLAGG,LEVEL_SW_DEATHEXIT_ZILLA, 0, GAMEFLAG_SW },
{ "sw_spawnmines", MITYPE_SETFLAGG,LEVEL_SW_SPAWNMINES, 0, GAMEFLAG_SW },

View file

@ -38,6 +38,7 @@
#include "c_dispatch.h"
#include "md4.h"
#include "hw_sections.h"
#include "mapinfo.h"
static TArray<usermaphack_t> usermaphacks;
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"))
{

View file

@ -71,6 +71,7 @@ CCMD(listmaps)
MapRecord *FindMapByName(const char *nm)
{
if (!nm || !*nm) return nullptr;
for (auto& map : mapList)
{
if (map->labelName.CompareNoCase(nm) == 0)

View file

@ -51,8 +51,9 @@ enum EMapGameFlags
LEVEL_SW_DEATHEXIT_SERPENT = 1024,
LEVEL_SW_DEATHEXIT_SUMO = 2048,
LEVEL_SW_DEATHEXIT_ZILLA = 4096,
LEVEL_SW_DEATHEXIT_SERPENT_NEXT = 8192,
LEVEL_WT_BOSSSPAWN = 8192,
LEVEL_WT_BOSSSPAWN = 16384,
};

View file

@ -7202,7 +7202,7 @@ domovethings(void)
{
FinishTimer = 0;
MapRecord *map = nullptr;
if (FinishAnim == ANIM_SUMO)
if (FinishAnim == ANIM_SUMO || FinishAnim == ANIM_SERP)
{
map = FindNextMap(currentLevel);
}

View file

@ -5327,8 +5327,13 @@ ActorHealth(short SpriteNum, short amt)
if (u->Health < u->MaxHealth/2)
{
FinishAnim = ANIM_SERP;
ChangeLevel(nullptr, g_nextskill);
return true;
// Hack for Last Warrior which apparently needs to continue with the next level here.
if (!(currentLevel->gameflags & LEVEL_SW_DEATHEXIT_SERPENT_NEXT))
{
ChangeLevel(nullptr, g_nextskill);
return true;
}
else FinishTimer = 1;
}
}

View file

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