mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
- 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:
@@ -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
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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.")
|
||||
Reference in New Issue
Block a user