revert stuff
This commit is contained in:
@@ -96,7 +96,7 @@
|
||||
mouseParams = params
|
||||
mouse_location_ref = WEAKREF(location)
|
||||
mouse_object_ref = WEAKREF(object)
|
||||
middle_drag_atom_ref = WEAKREF(control)
|
||||
mouse_control_object = control
|
||||
if(mob)
|
||||
SEND_SIGNAL(mob, COMSIG_MOB_CLIENT_MOUSEMOVE, object, location, control, params)
|
||||
// god forgive me for i have sinned - used for autoparry. currently at 5 objects.
|
||||
@@ -106,17 +106,10 @@
|
||||
..()
|
||||
|
||||
/client/MouseDrag(src_object,atom/over_object,src_location,over_location,src_control,over_control,params)
|
||||
var/list/modifiers = params2list(params)
|
||||
if (LAZYACCESS(modifiers, MIDDLE_CLICK))
|
||||
if (src_object && src_location != over_location)
|
||||
middragtime = world.time
|
||||
middle_drag_atom_ref = WEAKREF(src_object)
|
||||
else
|
||||
middragtime = 0
|
||||
middle_drag_atom_ref = null
|
||||
mouseParams = params
|
||||
mouse_location_ref = WEAKREF(over_location)
|
||||
mouse_object_ref = WEAKREF(over_object)
|
||||
mouse_control_object = over_control
|
||||
if(selected_target[1] && over_object?.IsAutoclickable())
|
||||
selected_target[1] = over_object
|
||||
selected_target[2] = params
|
||||
@@ -127,9 +120,3 @@
|
||||
|
||||
/obj/item/proc/onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
|
||||
return
|
||||
|
||||
/client/MouseDrop(atom/src_object, atom/over_object, atom/src_location, atom/over_location, src_control, over_control, params)
|
||||
if (IS_WEAKREF_OF(src_object, middle_drag_atom_ref))
|
||||
middragtime = 0
|
||||
middle_drag_atom_ref = null
|
||||
..()
|
||||
|
||||
@@ -138,10 +138,7 @@
|
||||
var/datum/weakref/mouse_location_ref = null
|
||||
///Used in MouseDrag to preserve the last mouse-entered object. Weakref
|
||||
var/datum/weakref/mouse_object_ref
|
||||
//Middle-mouse-button click dragtime control for aimbot exploit detection.
|
||||
var/middragtime = 0
|
||||
//Middle-mouse-button clicked object control for aimbot exploit detection. Weakref
|
||||
var/datum/weakref/middle_drag_atom_ref
|
||||
var/mouse_control_object
|
||||
|
||||
/// Messages currently seen by this client
|
||||
var/list/seen_messages
|
||||
|
||||
@@ -881,18 +881,11 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
click_intercept_time = 0 //Reset and return. Next click should work, but not this one.
|
||||
return
|
||||
click_intercept_time = 0 //Just reset. Let's not keep re-checking forever.
|
||||
var/ab = FALSE
|
||||
var/list/modifiers = params2list(params)
|
||||
|
||||
var/button_clicked = LAZYACCESS(modifiers, "button")
|
||||
|
||||
var/dragged = LAZYACCESS(modifiers, DRAG)
|
||||
if(dragged && button_clicked != dragged)
|
||||
if(modifiers[DRAG])
|
||||
return
|
||||
|
||||
if (object && IS_WEAKREF_OF(object, middle_drag_atom_ref) && button_clicked == LEFT_CLICK)
|
||||
ab = max(0, 5 SECONDS-(world.time-middragtime)*0.1)
|
||||
|
||||
var/mcl = CONFIG_GET(number/minute_click_limit)
|
||||
if (!holder && !ignore_spam && mcl)
|
||||
var/minute = round(world.time, 600)
|
||||
@@ -908,9 +901,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
clicklimiter[ADMINSWARNED_AT] = minute
|
||||
|
||||
msg += " Administrators have been informed."
|
||||
if (ab)
|
||||
log_game("[key_name(src)] is using the middle click aimbot exploit")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] [ADMIN_KICK(usr)] is using the middle click aimbot exploit</span>")
|
||||
log_click(object, location, control, params, src, "lockout (spam - minute)", TRUE)
|
||||
log_game("[key_name(src)] Has hit the per-minute click limit of [mcl] clicks in a given game minute")
|
||||
message_admins("[ADMIN_LOOKUPFLW(src)] [ADMIN_KICK(usr)] Has hit the per-minute click limit of [mcl] clicks in a given game minute")
|
||||
|
||||
Reference in New Issue
Block a user