mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-04 16:02:48 +00:00
betterexit integration!
This commit is contained in:
parent
e55f24419e
commit
014c1d8f03
2 changed files with 5 additions and 4 deletions
|
|
@ -359,7 +359,7 @@ consvar_t cv_cooplives = {"cooplives", "Avoid Game Over", CV_NETVAR|CV_CALL|CV_C
|
||||||
|
|
||||||
static CV_PossibleValue_t advancemap_cons_t[] = {{0, "Off"}, {1, "Next"}, {2, "Random"}, {0, NULL}};
|
static CV_PossibleValue_t advancemap_cons_t[] = {{0, "Off"}, {1, "Next"}, {2, "Random"}, {0, NULL}};
|
||||||
consvar_t cv_advancemap = {"advancemap", "Next", CV_NETVAR, advancemap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_advancemap = {"advancemap", "Next", CV_NETVAR, advancemap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
static CV_PossibleValue_t playersforexit_cons_t[] = {{0, "One"}, {1, "All"}, {0, NULL}};
|
static CV_PossibleValue_t playersforexit_cons_t[] = {{0, "One"}, {1, "1/4"}, {2, "Half"}, {3, "3/4"}, {4, "All"}, {0, NULL}};
|
||||||
consvar_t cv_playersforexit = {"playersforexit", "One", CV_NETVAR, playersforexit_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_playersforexit = {"playersforexit", "One", CV_NETVAR, playersforexit_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
consvar_t cv_runscripts = {"runscripts", "Yes", 0, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_runscripts = {"runscripts", "Yes", 0, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
|
||||||
|
|
@ -9419,7 +9419,7 @@ void P_PlayerThink(player_t *player)
|
||||||
{
|
{
|
||||||
if (cv_playersforexit.value) // Count to be sure everyone's exited
|
if (cv_playersforexit.value) // Count to be sure everyone's exited
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i, total = 0, exiting = 0;
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -9428,11 +9428,12 @@ void P_PlayerThink(player_t *player)
|
||||||
if (players[i].lives <= 0)
|
if (players[i].lives <= 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
total++;
|
||||||
if (!players[i].exiting || players[i].exiting > 3)
|
if (!players[i].exiting || players[i].exiting > 3)
|
||||||
break;
|
exiting++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == MAXPLAYERS)
|
if (((4*exiting)/total) >= cv_playersforexit.value)
|
||||||
{
|
{
|
||||||
if (server)
|
if (server)
|
||||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue