From e2cfb57886a228fedc5f014b760beb78089b1d0d Mon Sep 17 00:00:00 2001
From: BlueHNT <79374236+BlueHNT@users.noreply.github.com>
Date: Sat, 22 Jul 2023 15:19:36 +0200
Subject: [PATCH] prevents grabbing while not standing
This fixes: #2485
---
nsv13/code/modules/jobs/security/martial_art.dm | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/nsv13/code/modules/jobs/security/martial_art.dm b/nsv13/code/modules/jobs/security/martial_art.dm
index c769b208612..7cd32c12050 100644
--- a/nsv13/code/modules/jobs/security/martial_art.dm
+++ b/nsv13/code/modules/jobs/security/martial_art.dm
@@ -74,8 +74,9 @@
D.shake_animation(20)
D.adjustOxyLoss(10) // you smashed him into the ground
A.forceMove(get_turf(D))
- A.start_pulling(D, supress_message = FALSE)
- A.setGrabState(GRAB_AGGRESSIVE)
+ if(A.mobility_flags & MOBILITY_STAND) //Fixes permanent slowdown
+ A.start_pulling(D, supress_message = FALSE)
+ A.setGrabState(GRAB_AGGRESSIVE)
last_move = world.time
/datum/martial_art/jujitsu/proc/judo_throw(mob/living/carbon/human/A, mob/living/carbon/human/D)
@@ -91,8 +92,9 @@
D.forceMove(target)
A.setDir(newdir)
D.dropItemToGround(D.get_active_held_item()) // yeet
- A.start_pulling(D, supress_message = FALSE)
- A.setGrabState(GRAB_AGGRESSIVE)
+ if(A.mobility_flags & MOBILITY_STAND) //Fixes permanent slowdown
+ A.start_pulling(D, supress_message = FALSE)
+ A.setGrabState(GRAB_AGGRESSIVE)
D.adjustOxyLoss(40) // YOU THREW HIM, THREW HIM!!
D.Paralyze(7 SECONDS) //Equivalent to a clown PDA
D.visible_message("[A] throws [D] over their shoulder and pins them down!", "[A] throws you over their shoulder and pins you to the ground!")
@@ -131,7 +133,7 @@
return FALSE
if(A==D)
return FALSE //prevents grabbing yourself
- if(A.a_intent == INTENT_GRAB)
+ if(A.a_intent == INTENT_GRAB && A.mobility_flags & MOBILITY_STAND) //Fixes permanent slowdown and missfire
if(armlockstate == TRUE) // neck grabs if armlocked
A.setGrabState(GRAB_NECK)
D.visible_message("[A] grabs [D] from the armlock position by the neck!", \