From babe71cdeebf31b689bd6e7b53c14623d53ce502 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Fri, 24 Jul 2020 18:01:36 -0400 Subject: [PATCH] Try to avoid respawning you past the finish line --- src/k_respawn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/k_respawn.c b/src/k_respawn.c index ab229605a..360174fa1 100644 --- a/src/k_respawn.c +++ b/src/k_respawn.c @@ -334,8 +334,9 @@ static void K_MovePlayerToRespawnPoint(player_t *player) dest.x, dest.y ); - if ((player->respawn.distanceleft == 0) - && (K_GetWaypointIsSpawnpoint(player->respawn.wp) == true)) + if ((player->respawn.distanceleft == 0 && K_GetWaypointIsSpawnpoint(player->respawn.wp) == true) + || (player->respawn.wp == K_GetFinishLineWaypoint() + || player->respawn.wp->nextwaypoints[nwp] == K_GetFinishLineWaypoint())) // Try not to allow you to pass the finish line while respawning, because it's janky { // Alright buddy, that's the end of the ride. player->respawn.state = RESPAWNST_DROP;