diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm
index 8f4b5dab95e..7c2b44f5cab 100644
--- a/code/game/gamemodes/malfunction/Malf_Modules.dm
+++ b/code/game/gamemodes/malfunction/Malf_Modules.dm
@@ -185,7 +185,7 @@
set name = "Destroy RCDs"
set desc = "Detonate all RCDs on the station, while sparing onboard cyborg RCDs."
- if(stat || malf_cooldown)
+ if(stat || malf_cooldown > world.time)
return
for(var/obj/item/rcd/RCD in rcd_list)
@@ -193,9 +193,7 @@
RCD.detonate_pulse()
to_chat(src, "RCD detonation pulse emitted.")
- malf_cooldown = 1
- spawn(100)
- malf_cooldown = 0
+ malf_cooldown = world.time + 100
/datum/AI_Module/large/mecha_domination
@@ -454,7 +452,7 @@
set name = "Reactivate Cameranet"
set category = "Malfunction"
- if(stat || malf_cooldown)
+ if(stat || malf_cooldown > world.time)
return
var/fixedcams = 0 //Tells the AI how many cams it fixed. Stats are fun.
@@ -477,9 +475,7 @@
break
to_chat(src, "Diagnostic complete! Operations completed: [fixedcams].")
- malf_cooldown = 1
- spawn(30) //Lag protection
- malf_cooldown = 0
+ malf_cooldown = world.time + 30
/datum/AI_Module/large/upgrade_cameras
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index c0393d78f92..cf935b96341 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -69,7 +69,7 @@ var/list/ai_verbs_default = list(
var/control_disabled = 0 // Set to 1 to stop AI from interacting via Click() -- TLE
var/malfhacking = 0 // More or less a copy of the above var, so that malf AIs can hack and still get new cyborgs -- NeoFite
- var/malf_cooldown = 0 //Cooldown var for malf modules
+ var/malf_cooldown = 0 //Cooldown var for malf modules, stores a worldtime + cooldown
var/obj/machinery/power/apc/malfhack = null
var/explosive = 0 //does the AI explode when it dies?
@@ -1250,7 +1250,7 @@ var/list/ai_verbs_default = list(
else
to_chat(src, "Target is not on or near any active cameras on the station.")
-
+
/mob/living/silicon/ai/handle_fire()
return