From 5199e07ed98b8c9cd7da5f78cc19fd5f56ed5606 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Wed, 15 Apr 2020 15:23:23 -0400 Subject: [PATCH] Fix parallax slide and admin jump skybox --- code/_onclick/hud/skybox.dm | 4 ++++ code/modules/admin/verbs/adminjump.dm | 22 ++++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/code/_onclick/hud/skybox.dm b/code/_onclick/hud/skybox.dm index c6a3d5d259..affeef8893 100644 --- a/code/_onclick/hud/skybox.dm +++ b/code/_onclick/hud/skybox.dm @@ -49,6 +49,10 @@ if(old_z != new_z) client?.update_skybox(TRUE) +/mob/doMove() + if((. = ..())) + client?.update_skybox() + /mob/set_viewsize() . = ..() if (. && client) diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index db948d08e6..e414a774cd 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -13,7 +13,7 @@ if(config.allow_admin_jump) usr.on_mob_jump() - usr.loc = pick(get_area_turfs(A)) + usr.forceMove(pick(get_area_turfs(A))) log_admin("[key_name(usr)] jumped to [A]") message_admins("[key_name_admin(usr)] jumped to [A]", 1) @@ -30,7 +30,7 @@ log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]") message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1) usr.on_mob_jump() - usr.loc = T + usr.forceMove(T) feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! else alert("Admin jumping disabled") @@ -53,7 +53,7 @@ if(T && isturf(T)) feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! A.on_mob_jump() - A.loc = T + A.forceMove(T) else to_chat(A, "This mob is not located in the game world.") else @@ -70,9 +70,11 @@ if(src.mob) var/mob/A = src.mob A.on_mob_jump() - A.x = tx - A.y = ty - A.z = tz + var/turf/T = locate(tx, ty, tz) + if(!T) + to_chat(usr, "Those coordinates are outside the boundaries of the map.") + return + A.forceMove(T) feedback_add_details("admin_verb","JC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]") @@ -98,7 +100,7 @@ log_admin("[key_name(usr)] jumped to [key_name(M)]") message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1) usr.on_mob_jump() - usr.loc = M.loc + usr.forceMove(get_turf(M)) feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! else alert("Admin jumping disabled") @@ -115,7 +117,7 @@ message_admins(msg) admin_ticket_log(M, msg) M.on_mob_jump() - M.loc = get_turf(usr) + M.forceMove(get_turf(usr)) feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! else alert("Admin jumping disabled") @@ -145,7 +147,7 @@ admin_ticket_log(M, msg) if(M) M.on_mob_jump() - M.loc = get_turf(usr) + M.forceMove(get_turf(usr)) feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! else alert("Admin jumping disabled") @@ -159,7 +161,7 @@ if(A) if(config.allow_admin_jump) M.on_mob_jump() - M.loc = pick(get_area_turfs(A)) + M.forceMove(pick(get_area_turfs(A))) feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] teleported [key_name(M)]")