mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-30 21:31:03 +00:00
- fixed a few things.
Basic level progression is working, special cases still need testing, but for now it's good enough.
This commit is contained in:
parent
01fce31f43
commit
63eaec916b
5 changed files with 34 additions and 6 deletions
|
@ -173,7 +173,7 @@ bool cheatStuff(cheatseq_t *)
|
||||||
static bool cheatLevel(cheatseq_t *s)
|
static bool cheatLevel(cheatseq_t *s)
|
||||||
{
|
{
|
||||||
// Fixme: This should be broadcast as a net event once things are up again.
|
// Fixme: This should be broadcast as a net event once things are up again.
|
||||||
g_lastLevel = 0;
|
lastlevel = 0;
|
||||||
int volnume,levnume;
|
int volnume,levnume;
|
||||||
volnume = s->Args[0] - '0' - 1;
|
volnume = s->Args[0] - '0' - 1;
|
||||||
levnume = (s->Args[1] - '0')*10+(s->Args[2]-'0') - 1;
|
levnume = (s->Args[1] - '0')*10+(s->Args[2]-'0') - 1;
|
||||||
|
@ -261,7 +261,7 @@ static bool cheatCashman(cheatseq_t *)
|
||||||
|
|
||||||
static bool cheatSkill(cheatseq_t *s)
|
static bool cheatSkill(cheatseq_t *s)
|
||||||
{
|
{
|
||||||
g_lastLevel = 0;
|
lastlevel = 0;
|
||||||
ud.m_player_skill = ud.player_skill = s->Args[0] - '1';
|
ud.m_player_skill = ud.player_skill = s->Args[0] - '1';
|
||||||
ps[myconnectindex].gm |= MODE_RESTART;
|
ps[myconnectindex].gm |= MODE_RESTART;
|
||||||
FX_StopAllSounds();
|
FX_StopAllSounds();
|
||||||
|
|
|
@ -788,12 +788,12 @@ int parsecommand()
|
||||||
tempMusic.Reserve(1);
|
tempMusic.Reserve(1);
|
||||||
tempMusic.Last().levnum = levelnum(k, i);
|
tempMusic.Last().levnum = levelnum(k, i);
|
||||||
tempMusic.Last().music = parsebuffer.Data();
|
tempMusic.Last().music = parsebuffer.Data();
|
||||||
textptr += j;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
specialmusic.Push(parsebuffer.Data());
|
specialmusic.Push(parsebuffer.Data());
|
||||||
}
|
}
|
||||||
|
textptr += j;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1728,6 +1728,34 @@ void loadcons(const char* filenam)
|
||||||
auto map = FindMapByLevelNum(tm.levnum);
|
auto map = FindMapByLevelNum(tm.levnum);
|
||||||
if (map) map->music = tm.music;
|
if (map) map->music = tm.music;
|
||||||
}
|
}
|
||||||
|
if (isRRRA())
|
||||||
|
{
|
||||||
|
// RRRA goes directly to the second episode after E1L7 to continue the game.
|
||||||
|
int num = fileSystem.CheckNumForName("e1l7.map");
|
||||||
|
int file = fileSystem.GetFileContainer(num);
|
||||||
|
if (file <= fileSystem.GetMaxIwadNum())
|
||||||
|
{
|
||||||
|
auto maprec = FindMapByName("e1l7");
|
||||||
|
if (maprec) maprec->nextLevel = levelnum(1, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (isRR())
|
||||||
|
{
|
||||||
|
// 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(levelnum(1, 6));
|
||||||
|
auto maprec2 = FindMapByLevelNum(levelnum(1, 7));
|
||||||
|
auto maprec3 = FindMapByName("endgame");
|
||||||
|
int num3 = fileSystem.CheckNumForName("endgame.map");
|
||||||
|
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 = levelnum(1, 7);
|
||||||
|
}
|
||||||
|
}
|
||||||
tempMusic.Clear();
|
tempMusic.Clear();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -967,7 +967,8 @@ int exitlevel(void)
|
||||||
|
|
||||||
if (ps[myconnectindex].gm & MODE_RESTART)
|
if (ps[myconnectindex].gm & MODE_RESTART)
|
||||||
{
|
{
|
||||||
ud.nextLevel = currentLevel;
|
// If no level was set, restart the current one.
|
||||||
|
if (!ud.nextLevel) ud.nextLevel = currentLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ps[myconnectindex].gm & MODE_EOL)
|
if (ps[myconnectindex].gm & MODE_EOL)
|
||||||
|
|
|
@ -94,7 +94,7 @@ void G_NewGame(MapRecord *map, int skillNum)
|
||||||
int const UserMap = false;// Menu_HaveUserMap();
|
int const UserMap = false;// Menu_HaveUserMap();
|
||||||
|
|
||||||
// we don't want the intro to play after the multiplayer setup screen.
|
// we don't want the intro to play after the multiplayer setup screen.
|
||||||
if (!isRR() && (!g_netServer && ud.multimode < 2) && UserMap == 0 && currentLevel->levelNumber == levelnum(3, 0))
|
if (!isRR() && (!g_netServer && ud.multimode < 2) && UserMap == 0 && map->levelNumber == levelnum(3, 0))
|
||||||
{
|
{
|
||||||
e4intro([](bool) {});
|
e4intro([](bool) {});
|
||||||
}
|
}
|
||||||
|
|
|
@ -2241,7 +2241,6 @@ static void G_FadeLoad(int32_t r, int32_t g, int32_t b, int32_t start, int32_t e
|
||||||
int G_EnterLevel(int gameMode)
|
int G_EnterLevel(int gameMode)
|
||||||
{
|
{
|
||||||
int32_t i, mii;
|
int32_t i, mii;
|
||||||
char levelName[BMAX_PATH];
|
|
||||||
|
|
||||||
// flushpackets();
|
// flushpackets();
|
||||||
// waitforeverybody();
|
// waitforeverybody();
|
||||||
|
|
Loading…
Reference in a new issue