mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- fixing some issues. Level transitions in Duke are working now.
This commit is contained in:
parent
e5e8c02f1d
commit
77f96a1c75
5 changed files with 17 additions and 9 deletions
|
@ -236,7 +236,7 @@ void ChangeLevel(MapRecord* map, int skill)
|
|||
{
|
||||
Net_WriteByte(DEM_CHANGEMAP);
|
||||
Net_WriteByte(skill);
|
||||
Net_WriteString(map->labelName);
|
||||
Net_WriteString(map? map->labelName : nullptr);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -139,7 +139,9 @@ static void GameTicker()
|
|||
g_nextskill = -1;
|
||||
FX_StopAllSounds();
|
||||
FX_SetReverb(0);
|
||||
gi->NextLevel(currentLevel, -1);
|
||||
gi->FreeLevelData();
|
||||
gamestate = GS_LEVEL;
|
||||
gi->NextLevel(g_nextmap, -1);
|
||||
break;
|
||||
|
||||
case ga_completed:
|
||||
|
@ -149,7 +151,8 @@ static void GameTicker()
|
|||
{
|
||||
// if the same level is restarted, skip any progression stuff like summary screens or cutscenes.
|
||||
gi->FreeLevelData();
|
||||
gi->NextLevel(currentLevel, g_nextskill);
|
||||
gamestate = GS_LEVEL;
|
||||
gi->NextLevel(g_nextmap, g_nextskill);
|
||||
}
|
||||
else
|
||||
gi->LevelCompleted(g_nextmap, g_nextskill);
|
||||
|
@ -157,13 +160,15 @@ static void GameTicker()
|
|||
|
||||
case ga_nextlevel:
|
||||
gi->FreeLevelData();
|
||||
gi->NextLevel(currentLevel, g_nextskill);
|
||||
gamestate = GS_LEVEL;
|
||||
gi->NextLevel(g_nextmap, g_nextskill);
|
||||
break;
|
||||
|
||||
case ga_newgame:
|
||||
FX_StopAllSounds();
|
||||
FX_SetReverb(0);
|
||||
gi->FreeLevelData();
|
||||
gamestate = GS_LEVEL;
|
||||
gi->NewGame(g_nextmap, g_nextskill);
|
||||
break;
|
||||
|
||||
|
@ -289,6 +294,7 @@ void Display()
|
|||
switch (gamestate)
|
||||
{
|
||||
case GS_MENUSCREEN:
|
||||
case GS_FULLCONSOLE:
|
||||
gi->DrawBackground();
|
||||
break;
|
||||
|
||||
|
@ -314,6 +320,7 @@ void Display()
|
|||
break;
|
||||
|
||||
default:
|
||||
twod->ClearScreen();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -392,7 +399,7 @@ void TryRunTics (void)
|
|||
bool doWait = cl_capfps || pauseext || (r_NoInterpolate && !M_IsAnimated());
|
||||
|
||||
// get real tics
|
||||
if (doWait && gamestate != GS_INTERMISSION) // GS_INTERMISSION needs uncapped frame rate.
|
||||
if (doWait && gamestate != GS_INTERMISSION && gamestate != GS_INTRO) // GS_INTERMISSION needs uncapped frame rate.
|
||||
{
|
||||
entertic = I_WaitForTic (oldentertics);
|
||||
}
|
||||
|
|
|
@ -415,8 +415,8 @@ class ScreenJobRunner
|
|||
int index = -1;
|
||||
float screenfade;
|
||||
bool clearbefore;
|
||||
uint64_t startTime = -1;
|
||||
uint64_t lastTime = -1;
|
||||
int64_t startTime = -1;
|
||||
int64_t lastTime = -1;
|
||||
int actionState;
|
||||
int terminateState;
|
||||
|
||||
|
@ -474,7 +474,7 @@ public:
|
|||
auto now = I_nsTime();
|
||||
bool processed = job.job->ProcessInput();
|
||||
bool skiprequest = inputState.CheckAllInput() && !processed;
|
||||
if (startTime == -1) startTime = now;
|
||||
if (startTime == -1) lastTime = startTime = now;
|
||||
|
||||
if (M_Active())
|
||||
{
|
||||
|
|
|
@ -879,6 +879,7 @@ public:
|
|||
|
||||
int Frame(uint64_t clock, bool skiprequest)
|
||||
{
|
||||
Printf("Clock = %llu\n", clock);
|
||||
if (clock == 0) S_PlayBonusMusic();
|
||||
twod->ClearScreen();
|
||||
int currentclock = int(clock * 120 / 1'000'000'000);
|
||||
|
|
|
@ -166,7 +166,7 @@ void GameInterface::NextLevel(MapRecord* map, int skill)
|
|||
{
|
||||
ud.m_player_skill = skill + 1;
|
||||
int res = enterlevel(map, 0);
|
||||
if (!res) gameaction = ga_startup;
|
||||
if (res) gameaction = ga_startup;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue