diff --git a/code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm b/code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm index debe99d15aa7..e9862be49dd5 100644 --- a/code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm +++ b/code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm @@ -62,6 +62,3 @@ /// For any additional things that should happen when a xeno's melee_attack_additional_effects_self() proc is called #define COMSIG_XENO_SLASH_ADDITIONAL_EFFECTS_SELF "xeno_slash_additional_effects_self" - -/// Cancels all running cloaking effects on target -#define COMSIG_MOB_EFFECT_CLOAK_CANCEL "mob_effect_cloak_cancel" diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 6d91f104e550..efa51e3e0668 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -504,13 +504,13 @@ * Mobs that do now follow these conventions due to unusual sprites should require a special handling or redefinition of this proc, due to the density and layer changes. * The return of this proc is the previous value of the modified lying_angle if a change was successful (might include zero), or null if no change was made. */ -/mob/living/proc/set_lying_angle(new_lying) +/mob/living/proc/set_lying_angle(new_lying, on_movement = FALSE) if(new_lying == lying_angle) return . = lying_angle lying_angle = new_lying if(lying_angle != lying_prev) - update_transform() + update_transform(instant_update = on_movement) // Don't use transition for eg. crawling movement, because we already have the movement glide lying_prev = lying_angle ///Called by mob Move() when the lying_angle is different than zero, to better visually simulate crawling. @@ -623,7 +623,7 @@ /mob/living/proc/on_floored_start() if(body_position == STANDING_UP) //force them on the ground set_body_position(LYING_DOWN) - set_lying_angle(pick(90, 270)) + set_lying_angle(pick(90, 270), on_movement = TRUE) // on_fall() @@ -633,7 +633,7 @@ get_up() -/mob/living/update_transform() +/mob/living/update_transform(instant_update = FALSE) var/visual_angle = lying_angle if(!rotate_on_lying) return @@ -642,7 +642,8 @@ visual_angle = 90 // CM code - for fireman carry else if(lying_angle) base.Translate(rand(-10,10), rand(-10,10)) - apply_transform(base.Turn(visual_angle), UPDATE_TRANSFORM_ANIMATION_TIME) + var/update_time = instant_update && UPDATE_TRANSFORM_ANIMATION_TIME + apply_transform(base.Turn(visual_angle), update_time) // legacy procs diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index 483e104e6472..5eddf4c0058a 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -63,7 +63,7 @@ icon_living = "Normal [caste_name] Running" icon_dead = "Normal [caste_name] Dead" -/mob/living/simple_animal/hostile/alien/update_transform() +/mob/living/simple_animal/hostile/alien/update_transform(instant_update = FALSE) // TODO: Move all this mess outside of update_transform if(stat == DEAD) icon_state = "Normal [caste_name] Dead" diff --git a/code/modules/mob/mob_verbs.dm b/code/modules/mob/mob_verbs.dm index f5410a603f66..67d45092a4d8 100644 --- a/code/modules/mob/mob_verbs.dm +++ b/code/modules/mob/mob_verbs.dm @@ -216,9 +216,32 @@ -/mob/verb/stop_pulling_verb() +/mob/verb/stop_pulling() set name = "Stop Pulling" set category = "IC" - stop_pulling() + if(pulling) + REMOVE_TRAIT(pulling, TRAIT_FLOORED, CHOKEHOLD_TRAIT) + var/mob/M = pulling + pulling.pulledby = null + pulling = null + + grab_level = 0 + if(client) + client.recalculate_move_delay() + // When you stop pulling a mob after you move a tile with it your next movement will still include + // the grab delay so we have to fix it here (we love code) + client.next_movement = world.time + client.move_delay + if(hud_used && hud_used.pull_icon) + hud_used.pull_icon.icon_state = "pull0" + if(istype(r_hand, /obj/item/grab)) + temp_drop_inv_item(r_hand) + else if(istype(l_hand, /obj/item/grab)) + temp_drop_inv_item(l_hand) + if(istype(M)) + if(M.client) + //resist_grab uses long movement cooldown durations to prevent message spam + //so we must undo it here so the victim can move right away + M.client.next_movement = world.time + M.update_transform(TRUE)