mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'fix-no-waypoint-fault' into 'master'
Fix FAULT crash if no finish line waypoint See merge request KartKrew/Kart!1005
This commit is contained in:
commit
f16730b084
1 changed files with 4 additions and 2 deletions
|
|
@ -150,8 +150,10 @@ void K_DoIngameRespawn(player_t *player)
|
||||||
// FAULT
|
// FAULT
|
||||||
if ((gametyperules & GTR_CIRCUIT) && leveltime < starttime)
|
if ((gametyperules & GTR_CIRCUIT) && leveltime < starttime)
|
||||||
{
|
{
|
||||||
if (!(mapheaderinfo[gamemap-1]->levelflags & LF_SECTIONRACE))
|
const waypoint_t *finish = K_GetFinishLineWaypoint();
|
||||||
player->respawn.wp = K_GetFinishLineWaypoint()->prevwaypoints[0];
|
|
||||||
|
if (!(mapheaderinfo[gamemap-1]->levelflags & LF_SECTIONRACE) && finish != NULL)
|
||||||
|
player->respawn.wp = finish->prevwaypoints[0];
|
||||||
K_DoFault(player);
|
K_DoFault(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue