mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
Fixed: wi_noautostartmap was not sync safe
- Make wi_noautostartmap a userinfo cvar. This allows it to be communicated across the network and saved in demos. If any player has it set, then the intermission screen will not automatically advance to the next level.
This commit is contained in:
parent
8847d5649a
commit
285be8db92
3 changed files with 26 additions and 4 deletions
|
@ -325,6 +325,10 @@ struct userinfo_t : TMap<FName,FBaseCVar *>
|
||||||
{
|
{
|
||||||
return *static_cast<FIntCVar *>(*CheckKey(NAME_Gender));
|
return *static_cast<FIntCVar *>(*CheckKey(NAME_Gender));
|
||||||
}
|
}
|
||||||
|
bool GetNoAutostartMap() const
|
||||||
|
{
|
||||||
|
return *static_cast<FBoolCVar *>(*CheckKey(NAME_Wi_NoAutostartMap));
|
||||||
|
}
|
||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
int TeamChanged(int team);
|
int TeamChanged(int team);
|
||||||
|
|
|
@ -568,3 +568,4 @@ xx(NeverSwitchOnPickup)
|
||||||
xx(MoveBob)
|
xx(MoveBob)
|
||||||
xx(StillBob)
|
xx(StillBob)
|
||||||
xx(PlayerClass)
|
xx(PlayerClass)
|
||||||
|
xx(Wi_NoAutostartMap)
|
|
@ -62,7 +62,7 @@ typedef enum
|
||||||
|
|
||||||
CVAR (Bool, wi_percents, true, CVAR_ARCHIVE)
|
CVAR (Bool, wi_percents, true, CVAR_ARCHIVE)
|
||||||
CVAR (Bool, wi_showtotaltime, true, CVAR_ARCHIVE)
|
CVAR (Bool, wi_showtotaltime, true, CVAR_ARCHIVE)
|
||||||
CVAR (Bool, wi_noautostartmap, false, CVAR_ARCHIVE)
|
CVAR (Bool, wi_noautostartmap, false, CVAR_USERINFO|CVAR_ARCHIVE)
|
||||||
|
|
||||||
|
|
||||||
void WI_loadData ();
|
void WI_loadData ();
|
||||||
|
@ -1098,11 +1098,28 @@ void WI_updateNoState ()
|
||||||
{
|
{
|
||||||
WI_updateAnimatedBack();
|
WI_updateAnimatedBack();
|
||||||
|
|
||||||
|
if (acceleratestage)
|
||||||
|
{
|
||||||
|
cnt = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bool noauto = noautostartmap;
|
||||||
|
|
||||||
if (!wi_noautostartmap && !noautostartmap) cnt--;
|
for (int i = 0; !noauto && i < MAXPLAYERS; ++i)
|
||||||
if (acceleratestage) cnt=0;
|
{
|
||||||
|
if (playeringame[i])
|
||||||
|
{
|
||||||
|
noauto |= players[i].userinfo.GetNoAutostartMap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!noauto)
|
||||||
|
{
|
||||||
|
cnt--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (cnt==0)
|
if (cnt == 0)
|
||||||
{
|
{
|
||||||
WI_End();
|
WI_End();
|
||||||
G_WorldDone();
|
G_WorldDone();
|
||||||
|
|
Loading…
Reference in a new issue