From 200fc9859ae7f394d219e877018813cf28743e3d Mon Sep 17 00:00:00 2001 From: cracyc Date: Tue, 21 Jun 2016 09:35:09 -0500 Subject: [PATCH] plugins/cheat: don't turn off unless on (nw) --- plugins/cheat/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua index 05242e96d0d..ad8882d0141 100644 --- a/plugins/cheat/init.lua +++ b/plugins/cheat/init.lua @@ -329,7 +329,7 @@ function cheat.startplugin() index = index - #cheats if index == 2 then for num, cheat in pairs(cheats) do - if cheat.script and cheat.script.off then + if cheat.enabled and cheat.script.off then cheat.script.off() end cheat.enabled = false @@ -340,7 +340,7 @@ function cheat.startplugin() end elseif index == 3 then for num, cheat in pairs(cheats) do - if cheat.script and cheat.script.off then + if cheat.enabled and cheat.script.off then cheat.script.off() end end