mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-05 00:12:16 +00:00
Fix battlespawn cheat
This commit is contained in:
parent
8baf3cd28e
commit
eccc0a6924
1 changed files with 10 additions and 14 deletions
24
src/g_game.c
24
src/g_game.c
|
|
@ -2607,22 +2607,12 @@ mapthing_t *G_FindBattleStart(INT32 playernum)
|
||||||
|
|
||||||
if (numdmstarts)
|
if (numdmstarts)
|
||||||
{
|
{
|
||||||
extern consvar_t cv_battlespawn;
|
for (j = 0; j < 64; j++)
|
||||||
if (cv_battlespawn.value)
|
|
||||||
{
|
{
|
||||||
i = cv_battlespawn.value - 1;
|
i = P_RandomKey(PR_PLAYERSTARTS, numdmstarts);
|
||||||
if (i < numdmstarts)
|
if (G_CheckSpot(playernum, deathmatchstarts[i]))
|
||||||
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;
|
||||||
|
|
@ -2796,14 +2786,20 @@ static inline mapthing_t *G_FindTeamStartOrFallback(INT32 playernum)
|
||||||
|
|
||||||
mapthing_t *G_FindMapStart(INT32 playernum)
|
mapthing_t *G_FindMapStart(INT32 playernum)
|
||||||
{
|
{
|
||||||
|
extern consvar_t cv_battlespawn;
|
||||||
mapthing_t *spawnpoint;
|
mapthing_t *spawnpoint;
|
||||||
|
|
||||||
if (!playeringame[playernum])
|
if (!playeringame[playernum])
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
// -- battlespawn cheat --
|
||||||
|
// Everyone spawns at the same spot
|
||||||
|
if ((gametyperules & GTR_BATTLESTARTS) && cv_battlespawn.value > 0 && cv_battlespawn.value <= numdmstarts)
|
||||||
|
spawnpoint = deathmatchstarts[cv_battlespawn.value - 1];
|
||||||
|
|
||||||
// -- Podium --
|
// -- Podium --
|
||||||
// Single special behavior
|
// Single special behavior
|
||||||
if (K_PodiumSequence() == true)
|
else if (K_PodiumSequence() == true)
|
||||||
spawnpoint = G_FindPodiumStart(playernum);
|
spawnpoint = G_FindPodiumStart(playernum);
|
||||||
|
|
||||||
// -- Time Attack / Battle duels --
|
// -- Time Attack / Battle duels --
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue