From 3c407d971ede2590c849e3f212f3f18fd866b996 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Tue, 22 Oct 2019 17:27:06 -0400 Subject: [PATCH] Rudimentary wrong way --- src/d_player.h | 1 + src/dehacked.c | 3 ++- src/k_kart.c | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/d_player.h b/src/d_player.h index 163e9b7cf..07e0f7a97 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -330,6 +330,7 @@ typedef enum k_springstars, // Spawn stars around a player when they hit a spring k_springcolor, // Color of spring stars k_killfield, // How long have you been in the kill field, stay in too long and lose a bumper + k_wrongway, // Display WRONG WAY on screen NUMKARTSTUFF } kartstufftype_t; diff --git a/src/dehacked.c b/src/dehacked.c index 94b009803..fb6e7ff4f 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -8501,7 +8501,8 @@ static const char *const KARTSTUFF_LIST[] = { "TIREGREASE", "SPRINGSTARS", "SPRINGCOLOR", - "KILLFIELD" + "KILLFIELD", + "WRONGWAY" }; #endif diff --git a/src/k_kart.c b/src/k_kart.c index 492b94c72..363c762b5 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -5556,6 +5556,8 @@ static waypoint_t *K_GetPlayerNextWaypoint(player_t *player, boolean closest) { bestwaypoint = waypoint->nextwaypoints[i]; nextbestdelta = angledelta; + + player->kartstuff[k_wrongway] = 0; } } } @@ -5578,6 +5580,8 @@ static waypoint_t *K_GetPlayerNextWaypoint(player_t *player, boolean closest) { bestwaypoint = waypoint->prevwaypoints[i]; nextbestdelta = angledelta; + + player->kartstuff[k_wrongway] = 1; } } } @@ -10277,6 +10281,9 @@ void K_drawKartHUD(void) K_drawKartFreePlay(leveltime); } + if (stplyr->kartstuff[k_wrongway] && ((leveltime / 8) & 1)) + V_DrawCenteredString(BASEVIDWIDTH>>1, 176, V_REDMAP, "WRONG WAY"); + if (cv_kartdebugdistribution.value) K_drawDistributionDebugger();