Add fallback
This could be less safe but it prevents issues with the respawn not being set sometimes
This commit is contained in:
parent
2f84779d41
commit
de02aa13fd
1 changed files with 18 additions and 2 deletions
20
src/k_kart.c
20
src/k_kart.c
|
|
@ -9152,6 +9152,13 @@ void K_SetRespawnAtNextWaypoint(player_t * player)
|
||||||
{
|
{
|
||||||
oopisepoint = safewaypoint;
|
oopisepoint = safewaypoint;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (player->nextwaypoint)
|
||||||
|
{
|
||||||
|
oopisepoint = player->nextwaypoint;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oopisepoint && oopisepoint->numprevwaypoints > 0)
|
if (oopisepoint && oopisepoint->numprevwaypoints > 0)
|
||||||
|
|
@ -9198,8 +9205,17 @@ void K_SetRespawnAtNextWaypoint(player_t * player)
|
||||||
// Better safe then sorry.
|
// Better safe then sorry.
|
||||||
if (!safewaypoint)
|
if (!safewaypoint)
|
||||||
{
|
{
|
||||||
// Oh shit, oh fuck.....
|
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Tried to respawn at invalid waypoint!\n"));
|
if (player->nextwaypoint)
|
||||||
|
{
|
||||||
|
safewaypoint = player->nextwaypoint;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Oh shit, oh fuck.....
|
||||||
|
CONS_Alert(CONS_WARNING, M_GetText("Tried to respawn at invalid waypoint!\n"));
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue