diff options
Diffstat (limited to 'plugins/cheat/init.lua')
-rw-r--r-- | plugins/cheat/init.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua index 10cda2d4cdd..418489f9525 100644 --- a/plugins/cheat/init.lua +++ b/plugins/cheat/init.lua @@ -569,7 +569,11 @@ function cheat.startplugin() end cheat.set_index = set_index; cheat.set_value = function(cheat, value) - local idx, chg = cheat:set_index((value / cheat.parameter.step) + 1) + local idx = (value / cheat.parameter.step) + 1 + local chg = false + if math.integer(idx) == idx then + idx, chg = cheat:set_index(idx) + end return cheat.parameter.value, chg end cheat.get_index = function(cheat) return cheat.parameter.index end |