From 5d2ce584b34155ca6be53c83f89365daf39de3ba Mon Sep 17 00:00:00 2001 From: Couls Date: Sun, 14 Jul 2019 01:32:02 -0400 Subject: [PATCH 1/3] Update input.dm --- code/controllers/subsystem/input.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/controllers/subsystem/input.dm b/code/controllers/subsystem/input.dm index f2e0fdb0497..db1f3bd7fb1 100644 --- a/code/controllers/subsystem/input.dm +++ b/code/controllers/subsystem/input.dm @@ -115,6 +115,8 @@ SUBSYSTEM_DEF(input) /datum/controller/subsystem/input/fire() var/list/clients = GLOB.clients // Let's sing the list cache song + if(listclearnulls(clients)) // clear nulls before we run keyloop + log_world("Found a null in clients list!") for(var/i in 1 to clients.len) var/client/C = clients[i] C.keyLoop() From 0ee716ef3825745e5ead81c151a3d12585e4b020 Mon Sep 17 00:00:00 2001 From: Couls Date: Mon, 15 Jul 2019 20:21:54 -0400 Subject: [PATCH 2/3] Code improvement --- code/controllers/subsystem/input.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/controllers/subsystem/input.dm b/code/controllers/subsystem/input.dm index db1f3bd7fb1..0e88ef91675 100644 --- a/code/controllers/subsystem/input.dm +++ b/code/controllers/subsystem/input.dm @@ -117,6 +117,5 @@ SUBSYSTEM_DEF(input) var/list/clients = GLOB.clients // Let's sing the list cache song if(listclearnulls(clients)) // clear nulls before we run keyloop log_world("Found a null in clients list!") - for(var/i in 1 to clients.len) - var/client/C = clients[i] + for(var/client/C in clients) C.keyLoop() From e8b820eae6cdd9ba38ede196e9f12c70fd07598c Mon Sep 17 00:00:00 2001 From: Couls Date: Mon, 15 Jul 2019 21:13:29 -0400 Subject: [PATCH 3/3] Revert "Code improvement" This reverts commit 0ee716ef3825745e5ead81c151a3d12585e4b020. --- code/controllers/subsystem/input.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/controllers/subsystem/input.dm b/code/controllers/subsystem/input.dm index 0e88ef91675..db1f3bd7fb1 100644 --- a/code/controllers/subsystem/input.dm +++ b/code/controllers/subsystem/input.dm @@ -117,5 +117,6 @@ SUBSYSTEM_DEF(input) var/list/clients = GLOB.clients // Let's sing the list cache song if(listclearnulls(clients)) // clear nulls before we run keyloop log_world("Found a null in clients list!") - for(var/client/C in clients) + for(var/i in 1 to clients.len) + var/client/C = clients[i] C.keyLoop()