You can now move an object into nullspace, which will call exited on it's parent and parent area but will not call any entered. Note that you cannot pass null into forceMove it will crash, instead use the new proc that will call the underlying logic with a null destination Some of the force move procs have been refactored to check that their parent move succeeded before doing updates
23 lines
745 B
Plaintext
23 lines
745 B
Plaintext
/mob/living/silicon/Moved(oldLoc, dir)
|
|
. = ..()
|
|
update_camera_location(oldLoc)
|
|
|
|
/mob/living/silicon/forceMove(atom/destination)
|
|
. = ..()
|
|
//Only bother updating the camera if we actually managed to move
|
|
if(.)
|
|
update_camera_location(destination)
|
|
|
|
/mob/living/silicon/proc/do_camera_update(oldLoc)
|
|
if(!QDELETED(builtInCamera) && oldLoc != get_turf(src))
|
|
GLOB.cameranet.updatePortableCamera(builtInCamera)
|
|
updating = FALSE
|
|
|
|
#define SILICON_CAMERA_BUFFER 10
|
|
/mob/living/silicon/proc/update_camera_location(oldLoc)
|
|
oldLoc = get_turf(oldLoc)
|
|
if(!QDELETED(builtInCamera) && !updating && oldLoc != get_turf(src))
|
|
updating = TRUE
|
|
addtimer(CALLBACK(src, .proc/do_camera_update, oldLoc), SILICON_CAMERA_BUFFER)
|
|
#undef SILICON_CAMERA_BUFFER
|