mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
Fixes grabbed mobs being lowered after being buckled to a bed (#21047)
Stops the lowering animation from triggering if the mob is buckled to a roller bed while grabbed, screenshot shows live functionality with the bed extended but the patient laying over the legs of the bed. <img width="119" height="118" alt="image" src="https://github.com/user-attachments/assets/b34fe654-9692-4771-bcca-6633068a9d8b" />
This commit is contained in:
@@ -199,6 +199,9 @@
|
||||
/obj/item/grab/proc/adjust_position()
|
||||
if(!affecting)
|
||||
return
|
||||
var/buckled_to_bed = affecting.buckled_to ? istype(affecting.buckled_to, /obj/structure/bed/roller) : FALSE
|
||||
if(buckled_to_bed)
|
||||
return
|
||||
if(affecting.buckled_to && affecting.buckled_to != assailant)
|
||||
animate(affecting, pixel_x = affecting.get_standard_pixel_x(), pixel_y = affecting.get_standard_pixel_y(), 4, 1, LINEAR_EASING)
|
||||
return
|
||||
@@ -415,9 +418,10 @@
|
||||
affecting.update_canmove()
|
||||
affecting.anchored = FALSE
|
||||
UnregisterSignal(assailant, COMSIG_MOVABLE_MOVED)
|
||||
|
||||
animate(affecting, pixel_x = affecting.get_standard_pixel_x(), pixel_y = affecting.get_standard_pixel_y(), 4, 1, LINEAR_EASING)
|
||||
affecting.layer = initial(affecting.layer)
|
||||
var/buckled_to_bed = affecting.buckled_to ? istype(affecting.buckled_to, /obj/structure/bed/roller) : FALSE
|
||||
if(!buckled_to_bed)
|
||||
animate(affecting, pixel_x = affecting.get_standard_pixel_x(), pixel_y = affecting.get_standard_pixel_y(), 4, 1, LINEAR_EASING)
|
||||
affecting.layer = initial(affecting.layer)
|
||||
if(affecting)
|
||||
ADD_FALLING_ATOM(affecting) // Makes the grabbee check if they can fall.
|
||||
affecting.grabbed_by -= src
|
||||
|
||||
Reference in New Issue
Block a user