mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
Added wi_autoadvance
- Prevents an absent player from stopping the intermission
This commit is contained in:
parent
a3a7ee569f
commit
2d896d2b47
1 changed files with 9 additions and 5 deletions
|
@ -64,6 +64,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_USERINFO|CVAR_ARCHIVE)
|
CVAR (Bool, wi_noautostartmap, false, CVAR_USERINFO|CVAR_ARCHIVE)
|
||||||
|
CVAR (Int, wi_autoadvance, 0, CVAR_SERVERINFO)
|
||||||
|
|
||||||
|
|
||||||
void WI_loadData ();
|
void WI_loadData ();
|
||||||
|
@ -1113,6 +1114,7 @@ void WI_updateNoState ()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool noauto = noautostartmap;
|
bool noauto = noautostartmap;
|
||||||
|
bool autoskip = (wi_autoadvance > 0 && bcnt > (wi_autoadvance * TICRATE));
|
||||||
|
|
||||||
for (int i = 0; !noauto && i < MAXPLAYERS; ++i)
|
for (int i = 0; !noauto && i < MAXPLAYERS; ++i)
|
||||||
{
|
{
|
||||||
|
@ -1121,7 +1123,7 @@ void WI_updateNoState ()
|
||||||
noauto |= players[i].userinfo.GetNoAutostartMap();
|
noauto |= players[i].userinfo.GetNoAutostartMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!noauto)
|
if (!noauto || autoskip)
|
||||||
{
|
{
|
||||||
cnt--;
|
cnt--;
|
||||||
}
|
}
|
||||||
|
@ -1252,10 +1254,11 @@ void WI_updateDeathmatchStats ()
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
bool stillticking;
|
bool stillticking;
|
||||||
|
bool autoskip = (wi_autoadvance > 0 && bcnt > (wi_autoadvance * TICRATE));
|
||||||
|
|
||||||
WI_updateAnimatedBack();
|
WI_updateAnimatedBack();
|
||||||
|
|
||||||
if (acceleratestage && ng_state != 6)
|
if ((acceleratestage || autoskip) && ng_state != 6)
|
||||||
{
|
{
|
||||||
acceleratestage = 0;
|
acceleratestage = 0;
|
||||||
|
|
||||||
|
@ -1332,7 +1335,7 @@ void WI_updateDeathmatchStats ()
|
||||||
}
|
}
|
||||||
|
|
||||||
// All players are ready; proceed.
|
// All players are ready; proceed.
|
||||||
if (i == MAXPLAYERS && acceleratestage)
|
if ((i == MAXPLAYERS && acceleratestage) || autoskip)
|
||||||
{
|
{
|
||||||
S_Sound(CHAN_VOICE | CHAN_UI, "intermission/pastdmstats", 1, ATTN_NONE);
|
S_Sound(CHAN_VOICE | CHAN_UI, "intermission/pastdmstats", 1, ATTN_NONE);
|
||||||
WI_initShowNextLoc();
|
WI_initShowNextLoc();
|
||||||
|
@ -1503,10 +1506,11 @@ void WI_updateNetgameStats ()
|
||||||
int i;
|
int i;
|
||||||
int fsum;
|
int fsum;
|
||||||
bool stillticking;
|
bool stillticking;
|
||||||
|
bool autoskip = (wi_autoadvance > 0 && bcnt > (wi_autoadvance * TICRATE));
|
||||||
|
|
||||||
WI_updateAnimatedBack ();
|
WI_updateAnimatedBack ();
|
||||||
|
|
||||||
if (acceleratestage && ng_state != 10)
|
if ((acceleratestage || autoskip) && ng_state != 10)
|
||||||
{
|
{
|
||||||
acceleratestage = 0;
|
acceleratestage = 0;
|
||||||
|
|
||||||
|
@ -1639,7 +1643,7 @@ void WI_updateNetgameStats ()
|
||||||
}
|
}
|
||||||
|
|
||||||
// All players are ready; proceed.
|
// All players are ready; proceed.
|
||||||
if (i == MAXPLAYERS && acceleratestage)
|
if ((i == MAXPLAYERS && acceleratestage) || autoskip)
|
||||||
{
|
{
|
||||||
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/pastcoopstats", 1, ATTN_NONE);
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/pastcoopstats", 1, ATTN_NONE);
|
||||||
WI_initShowNextLoc();
|
WI_initShowNextLoc();
|
||||||
|
|
Loading…
Reference in a new issue