From 61053a2bc38930554fc4ebd4cae024eb46b614d4 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 25 Sep 2023 21:32:37 +0200 Subject: [PATCH] [MIRROR] Fixes tackling issues with stun immune tacklers [MDB IGNORE] (#23911) * Fixes tackling issues with stun immune tacklers (#78494) ## About The Pull Request When a human uses gripper gloves and such to perform a tackle, it does some stuff with knockdowns. First, at the start of the tackle, the tackler is given 1 or 2 seconds of knockdown. This knockdown bypasses stun immunity. If the tackle and its rolled to be an expert or monster tackle, then this initial knockdown is cleared. However, the knockdown clearing does NOT bypass stun immunity. This ironically meant that stun immune tacklers would remain knocked down when landing a monster tackle, and it would cause a runtime because knocked down people can't grab. This PR just makes the knockdown clear bypass stun immunity as well. Closes #78441. * Fixes tackling issues with stun immune tacklers --------- Co-authored-by: GPeckman <21979502+GPeckman@users.noreply.github.com> --- code/datums/components/tackle.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/datums/components/tackle.dm b/code/datums/components/tackle.dm index ffd20cc2c13..4ae3a973d7e 100644 --- a/code/datums/components/tackle.dm +++ b/code/datums/components/tackle.dm @@ -205,7 +205,8 @@ user.visible_message(span_warning("[user] lands an expert [tackle_word] on [target], knocking [target.p_them()] down hard while landing on [user.p_their()] feet with a passive grip!"), span_userdanger("You land an expert [tackle_word] on [target], knocking [target.p_them()] down hard while landing on your feet with a passive grip!"), ignored_mobs = target) to_chat(target, span_userdanger("[user] lands an expert [tackle_word] on you, knocking you down hard and maintaining a passive grab!")) - user.SetKnockdown(0) + // Ignore_canstun has to be true, or else a stunimmune user would stay knocked down. + user.SetKnockdown(0, ignore_canstun = TRUE) user.get_up(TRUE) user.forceMove(get_turf(target)) target.adjustStaminaLoss(40) @@ -228,7 +229,8 @@ user.visible_message(span_warning("[user] lands a monster [tackle_word] on [target], knocking [target.p_them()] senseless and applying an aggressive pin!"), span_userdanger("You land a monster [tackle_word] on [target], knocking [target.p_them()] senseless and applying an aggressive pin!"), ignored_mobs = target) to_chat(target, span_userdanger("[user] lands a monster [tackle_word] on you, knocking you senseless and aggressively pinning you!")) - user.SetKnockdown(0) + // Ignore_canstun has to be true, or else a stunimmune user would stay knocked down. + user.SetKnockdown(0, ignore_canstun = TRUE) user.get_up(TRUE) user.forceMove(get_turf(target)) target.adjustStaminaLoss(40)