mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Battle: add battlespawn cheat, spawn every player at the same spawnpoint
This commit is contained in:
parent
db0175a94d
commit
08dc00ea88
2 changed files with 14 additions and 3 deletions
|
|
@ -789,6 +789,7 @@ consvar_t cv_votetime = UnsavedNetVar("votetime", "20").min_max(10, 3600);
|
||||||
//
|
//
|
||||||
|
|
||||||
consvar_t cv_barriertime = OnlineCheat("barriertime", "30").values(CV_Natural).description("How long it takes for the Barrier to shrink in Battle Overtime");
|
consvar_t cv_barriertime = OnlineCheat("barriertime", "30").values(CV_Natural).description("How long it takes for the Barrier to shrink in Battle Overtime");
|
||||||
|
consvar_t cv_battlespawn = OnlineCheat("battlespawn", "0").values(CV_Unsigned).description("Spawn every player at the same spawnpoint in Battle (0 = random spawns)");
|
||||||
consvar_t cv_battletest = OnlineCheat("battletest", "Off").on_off().description("Free Play goes to Battle instead of Prisons");
|
consvar_t cv_battletest = OnlineCheat("battletest", "Off").on_off().description("Free Play goes to Battle instead of Prisons");
|
||||||
|
|
||||||
#ifdef DEVELOP
|
#ifdef DEVELOP
|
||||||
|
|
|
||||||
16
src/g_game.c
16
src/g_game.c
|
|
@ -2603,12 +2603,22 @@ mapthing_t *G_FindBattleStart(INT32 playernum)
|
||||||
|
|
||||||
if (numdmstarts)
|
if (numdmstarts)
|
||||||
{
|
{
|
||||||
for (j = 0; j < 64; j++)
|
extern consvar_t cv_battlespawn;
|
||||||
|
if (cv_battlespawn.value)
|
||||||
{
|
{
|
||||||
i = P_RandomKey(PR_PLAYERSTARTS, numdmstarts);
|
i = cv_battlespawn.value - 1;
|
||||||
if (G_CheckSpot(playernum, deathmatchstarts[i]))
|
if (i < numdmstarts)
|
||||||
return deathmatchstarts[i];
|
return deathmatchstarts[i];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (j = 0; j < 64; j++)
|
||||||
|
{
|
||||||
|
i = P_RandomKey(PR_PLAYERSTARTS, numdmstarts);
|
||||||
|
if (G_CheckSpot(playernum, deathmatchstarts[i]))
|
||||||
|
return deathmatchstarts[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
if (doprints)
|
if (doprints)
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Could not spawn at any Deathmatch starts!\n"));
|
CONS_Alert(CONS_WARNING, M_GetText("Could not spawn at any Deathmatch starts!\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue