From 3f71251fd6840e5804bd366ed089f91afc57e6bb Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 24 Jan 2022 22:52:50 +0000 Subject: [PATCH 1/2] Fix a correctly timed Thunder Shield preventing you from using rings (resolves #220) --- src/k_kart.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 99f2b1cac..6fae0ca2f 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -9254,8 +9254,16 @@ void K_MoveKartPlayer(player_t *player, boolean onground) if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO) { K_DoThunderShield(player); - player->itemamount--; - K_PlayAttackTaunt(player->mo); + if (player->itemamount > 0) + { + // Why is this a conditional? + // Thunder shield: the only item that allows you to + // activate a mine while you're out of its radius, + // the SAME tic it sets your itemamount to 0 + // ...:dumbestass: + player->itemamount--; + K_PlayAttackTaunt(player->mo); + } } break; case KITEM_BUBBLESHIELD: From 2e54e38607cb8c800702afc36330a33546c76c49 Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 25 Jan 2022 17:02:19 +0000 Subject: [PATCH 2/2] Diagnose itemamount underflows easier (show the empty box and number if nonzero count but zero item type) --- src/k_hud.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/k_hud.c b/src/k_hud.c index 62253ba68..221fbf097 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -1274,7 +1274,8 @@ static void K_drawKartItem(void) localpatch = kp_sadface[offset]; break; default: - return; + localpatch = kp_nodraw; // diagnose underflows + break; } if ((stplyr->pflags & PF_ITEMOUT) && !(leveltime & 1))