mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Fixes movement issues with opening and closing closets
Fixes #3687 Mobs no longer act as if they've moved when in a locker whilst it's opened and closed. The new proc does everything forceMove does except trigger /crossed on /items and run the extra code in turfs\simulated\Entered (still makes the parent call) Also removed some now unneeded code from the /slip proc as this makes it redundant
This commit is contained in:
@@ -55,11 +55,20 @@
|
||||
I.forceMove(loc)
|
||||
|
||||
for(var/mob/M in src)
|
||||
M.forceMove(loc)
|
||||
moveMob(M, loc)
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
/obj/structure/closet/proc/moveMob(var/mob/M, var/atom/destination)
|
||||
loc.Exited(M)
|
||||
M.loc = destination
|
||||
loc.Entered(M, ignoreRest = 1)
|
||||
for (var/atom/movable/AM in loc)
|
||||
if (istype(AM, /obj/item))
|
||||
continue
|
||||
AM.Crossed(M)
|
||||
|
||||
/obj/structure/closet/proc/open()
|
||||
if(src.opened)
|
||||
return 0
|
||||
@@ -112,7 +121,7 @@
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
|
||||
M.forceMove(src)
|
||||
moveMob(M, src)
|
||||
itemcount++
|
||||
|
||||
src.icon_state = src.icon_closed
|
||||
|
||||
Reference in New Issue
Block a user