mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
M_StartControlPanel: Guarantee titlemap contexts have internal server stopped when entering menu
Guarantees netUnlocked is correctly updated in most contexts, since that's dependent on SV_ResetServer, which isn't called if a server is running Also guarantees titlemapinaction isn't true during regular play
This commit is contained in:
parent
b7825dba88
commit
32afe48aab
2 changed files with 9 additions and 0 deletions
|
|
@ -3927,6 +3927,7 @@ void SV_StopServer(void)
|
|||
maketic = gametic+1;
|
||||
neededtic = maketic;
|
||||
serverrunning = false;
|
||||
titlemapinaction = false;
|
||||
}
|
||||
|
||||
// called at singleplayer start and stopdemo
|
||||
|
|
|
|||
|
|
@ -726,6 +726,14 @@ void M_StartControlPanel(void)
|
|||
{
|
||||
if (gamestate != GS_MENU)
|
||||
{
|
||||
if (titlemapinaction)
|
||||
{
|
||||
// We clear a LITTLE bit of state, but not a full D_ClearState.
|
||||
// Just enough to guarantee SV_ResetServer is called before session start.
|
||||
SV_StopServer();
|
||||
SV_ResetServer();
|
||||
}
|
||||
|
||||
G_SetGamestate(GS_MENU);
|
||||
|
||||
gameaction = ga_nothing;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue