From 546bb52e3b25f969dd1d2367dec4378711712d0a Mon Sep 17 00:00:00 2001 From: Lach Date: Fri, 20 Jun 2025 20:57:31 +1000 Subject: [PATCH] Reduce stunned tics for damage caused by non-players --- src/k_kart.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/k_kart.c b/src/k_kart.c index 37452e6be..6a83abda4 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -16334,6 +16334,22 @@ void K_ApplyStun(player_t *player, mobj_t *inflictor, mobj_t *source, INT32 dama stunTics /= 3; } + if (source && source->player) + { + // hits scored by players apply full stun + ; + } + else if (inflictor && (P_IsKartItem(inflictor->type) || P_IsKartFieldItem(inflictor->type))) + { + // items not thrown by a player apply half stun + stunTics /= 2; + } + else + { + // all other hazards apply 1/4 stun + stunTics /= 4; + } + player->stunned = max(stunTics, 0); #undef BASE_STUN_TICS_MIN