- Small edit to the movement killswitch. The person who enables it will now be allowed to move, so he can try to detect any change to lag.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5572 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz@gmail.com
2013-01-18 03:12:43 +00:00
parent 3d0d03a74f
commit f873b86b35
3 changed files with 4 additions and 2 deletions

View File

@@ -14,7 +14,7 @@
levelupdate()
/turf/simulated/Entered(atom/A, atom/OL)
if(movement_disabled)
if(movement_disabled && usr.ckey != movement_disabled_exception)
usr << "\red Movement is admin-disabled." //This is to identify lag problems
return

View File

@@ -68,7 +68,7 @@
return 0
/turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area)
if(movement_disabled)
if(movement_disabled && usr.ckey != movement_disabled_exception)
usr << "\red Movement is admin-disabled." //This is to identify lag problems
return
if (!mover || !isturf(mover.loc))

View File

@@ -288,6 +288,7 @@ var/global/say_disabled = 0
//This proc is intended to detect lag problems relating to movement
var/global/movement_disabled = 0
var/global/movement_disabled_exception //This is the client that calls the proc, so he can continue to run around to gauge any change to lag.
/client/proc/disable_movement()
set category = "Mapping"
set name = "Disable all movement"
@@ -295,5 +296,6 @@ var/global/movement_disabled = 0
movement_disabled = !movement_disabled
if(movement_disabled)
message_admins("[src.ckey] used 'Disable all movement', killing all movement.")
movement_disabled_exception = usr.ckey
else
message_admins("[src.ckey] used 'Disable all movement', restoring all movement.")