mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-27 18:24:40 +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_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");
|
||||
|
||||
#ifdef DEVELOP
|
||||
|
|
|
|||
16
src/g_game.c
16
src/g_game.c
|
|
@ -2603,12 +2603,22 @@ mapthing_t *G_FindBattleStart(INT32 playernum)
|
|||
|
||||
if (numdmstarts)
|
||||
{
|
||||
for (j = 0; j < 64; j++)
|
||||
extern consvar_t cv_battlespawn;
|
||||
if (cv_battlespawn.value)
|
||||
{
|
||||
i = P_RandomKey(PR_PLAYERSTARTS, numdmstarts);
|
||||
if (G_CheckSpot(playernum, deathmatchstarts[i]))
|
||||
i = cv_battlespawn.value - 1;
|
||||
if (i < numdmstarts)
|
||||
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)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Could not spawn at any Deathmatch starts!\n"));
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue