mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-13 19:40:43 +00:00
- RR progression fixes.
* E1L7 abuses an 'end the game' command to progress to E2L1, this needs special treatment. * handle ENDGAME.MAP more cleanly by injecting an 'engine.con' into the compilation chain to define its map record. The main issue with this is that it needs to be defined before the regular CONs run. * check the already defined 'clearinventory' and 'clearweapons' flags that are exposed through RMAPINFO (Duke/RR only so far.)
This commit is contained in:
parent
9bc210fe35
commit
dbd179be5c
4 changed files with 15 additions and 26 deletions
|
@ -29,6 +29,7 @@ enum EMapFlags
|
|||
LEVEL_SECRETEXITOVERRIDE = 2, // when given an explicit level number, override with secret exit in the map, mainly for compiling episodes out of single levels.
|
||||
LEVEL_CLEARINVENTORY = 4,
|
||||
LEVEL_CLEARWEAPONS = 8,
|
||||
LEVEL_FORCENOEOG = 16, // RR E1L7 needs this to override its boss's death ending the game.
|
||||
};
|
||||
|
||||
enum EMapGameFlags
|
||||
|
|
|
@ -3239,8 +3239,15 @@ void FixMapinfo()
|
|||
{
|
||||
if (isRR() && map->cluster == 1)
|
||||
{
|
||||
auto nextmap = FindMapByIndexOnly(map->cluster + 1, 1);
|
||||
if (nextmap) map->NextMap = nextmap->labelName;
|
||||
if (!FindMapByIndexOnly(map->cluster, map->mapindex + 1))
|
||||
{
|
||||
auto nextmap = FindMapByIndexOnly(map->cluster + 1, 1);
|
||||
if (nextmap)
|
||||
{
|
||||
map->NextMap = nextmap->labelName;
|
||||
map->flags |= LEVEL_FORCENOEOG;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3256,27 +3263,6 @@ void FixMapinfo()
|
|||
if (maprec) maprec->NextMap = "e1l5";
|
||||
}
|
||||
}
|
||||
else if (isRR())
|
||||
{
|
||||
if (!isRRRA())
|
||||
{
|
||||
// RR does not define its final level and crudely hacked it into the progression. This puts it into the E2L8 slot so that the game can naturally progress there.
|
||||
auto maprec1 = FindMapByLevelNum(makelevelnum(1, 6)); // E2L7 must exist
|
||||
auto maprec2 = FindMapByLevelNum(makelevelnum(1, 7)); // E2L8 must not exist
|
||||
auto maprec3 = FindMapByName("endgame"); // endgame must not have a map record already
|
||||
int num3 = fileSystem.FindFile("endgame.map"); // endgame.map must exist.
|
||||
if (maprec1 && !maprec2 && !maprec3 && num3 >= 0)
|
||||
{
|
||||
auto maprec = AllocateMap();
|
||||
maprec->designerTime = 0;
|
||||
maprec->parTime = 0;
|
||||
maprec->SetFileName("endgame.map");
|
||||
maprec->SetName("$TXT_CLOSEENCOUNTERS");
|
||||
maprec->levelNumber = makelevelnum(1, 7);
|
||||
maprec->cluster = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
END_DUKE_NS
|
||||
|
|
|
@ -911,7 +911,7 @@ void enterlevel(MapRecord *mi, int gamemode)
|
|||
|
||||
for (int i = connecthead; i >= 0; i = connectpoint2[i])
|
||||
{
|
||||
bool clearweapon = false;
|
||||
bool clearweapon = !!(currentLevel->flags & LEVEL_CLEARWEAPONS);
|
||||
int pn = sector[ps[i].GetActor()->s->sectnum].floorpicnum;
|
||||
if (pn == TILE_HURTRAIL || pn == TILE_FLOORSLIME || pn == TILE_FLOORPLASMA)
|
||||
{
|
||||
|
@ -928,6 +928,7 @@ void enterlevel(MapRecord *mi, int gamemode)
|
|||
ps[i].kickback_pic = 0;
|
||||
ps[i].okickback_pic = ps[i].kickback_pic = 0;
|
||||
}
|
||||
if (currentLevel->flags & LEVEL_CLEARINVENTORY) resetinventory(i);
|
||||
}
|
||||
resetmys();
|
||||
|
||||
|
@ -992,10 +993,10 @@ void GameInterface::NewGame(MapRecord* map, int skill, bool)
|
|||
|
||||
bool setnextmap(bool checksecretexit)
|
||||
{
|
||||
MapRecord* map = nullptr;;
|
||||
MapRecord* map = nullptr;
|
||||
MapRecord* from_bonus = nullptr;
|
||||
|
||||
if (ud.eog)
|
||||
if (ud.eog && !(currentLevel->flags & LEVEL_FORCENOEOG))
|
||||
{
|
||||
}
|
||||
else if (checksecretexit && ud.from_bonus == 0)
|
||||
|
|
1
wadsrc/static/filter/redneck.redneck/engine/engine.con
Normal file
1
wadsrc/static/filter/redneck.redneck/engine/engine.con
Normal file
|
@ -0,0 +1 @@
|
|||
definelevelname 1 7 endgame.map 02:00 02:00 $TXT_CLOSEENCOUNTERS
|
Loading…
Reference in a new issue