mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
K_DoIngameRespawn: In Tutorial specifically, tightly tie allowed fallback spawnpoints (if not yet crossed a checkpoint line) to relative player ID
Not literal player ID so that nothing gets messy when returning from Test Track challenge
This commit is contained in:
parent
39e33bd98e
commit
9bd29a87b2
1 changed files with 18 additions and 1 deletions
|
|
@ -255,7 +255,24 @@ void K_DoIngameRespawn(player_t *player)
|
||||||
{
|
{
|
||||||
UINT8 i = 0;
|
UINT8 i = 0;
|
||||||
|
|
||||||
for (i = 0; i < numstarts; i++)
|
if (gametype == GT_TUTORIAL)
|
||||||
|
{
|
||||||
|
// In tutorial, spawnpoints are player ID locked.
|
||||||
|
// ...but returning from Test Track can do funny things,
|
||||||
|
// so we use relative ID instead of literal slot number.
|
||||||
|
UINT8 spos = 0;
|
||||||
|
for (; i < MAXPLAYERS; i++)
|
||||||
|
{
|
||||||
|
if (i == player-players)
|
||||||
|
break;
|
||||||
|
if (!playeringame[i])
|
||||||
|
continue;
|
||||||
|
spos++;
|
||||||
|
}
|
||||||
|
|
||||||
|
beststart = starts[spos % numstarts];
|
||||||
|
}
|
||||||
|
else for (i = 0; i < numstarts; i++)
|
||||||
{
|
{
|
||||||
UINT32 dist = UINT32_MAX;
|
UINT32 dist = UINT32_MAX;
|
||||||
mapthing_t *checkstart = NULL;
|
mapthing_t *checkstart = NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue