From ed01938f049c1db43b63b0513f24ed7cab124513 Mon Sep 17 00:00:00 2001 From: Gboster-0 <82319946+Gboster-0@users.noreply.github.com> Date: Thu, 28 Nov 2024 03:19:09 +0100 Subject: [PATCH] [MIRROR] Removed proc overhead from the Input subsystem (#59339) (#2568) Removed proc overhead from the Input subsystem (#59339) Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com> --- code/controllers/subsystem/input.dm | 6 ++---- code/modules/keybindings/bindings_client.dm | 6 ------ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/code/controllers/subsystem/input.dm b/code/controllers/subsystem/input.dm index a78feffd8503..311eec6e684d 100644 --- a/code/controllers/subsystem/input.dm +++ b/code/controllers/subsystem/input.dm @@ -35,7 +35,5 @@ SUBSYSTEM_DEF(input) user.set_macros() /datum/controller/subsystem/input/fire() - var/list/clients = GLOB.clients // Let's sing the list cache song - for(var/i in 1 to clients.len) - var/client/C = clients[i] - C.keyLoop() + for(var/mob/user as anything in GLOB.player_list) + user.focus?.keyLoop(user.client) diff --git a/code/modules/keybindings/bindings_client.dm b/code/modules/keybindings/bindings_client.dm index 1bf8396d4d02..08bc8b0c6e1f 100644 --- a/code/modules/keybindings/bindings_client.dm +++ b/code/modules/keybindings/bindings_client.dm @@ -108,9 +108,3 @@ if(mob) mob.focus?.key_up(_key, src) mob.update_mouse_pointer() - - -// Called every game tick -/client/keyLoop() - holder?.keyLoop(src) - mob?.focus?.keyLoop(src)