From 1f9a9062e022c401826155efd3cd45a479d50c15 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Wed, 25 Oct 2017 10:51:19 +0200 Subject: Replace many math.floor(x+0.5) calls (or math.floor calls that should be those) by custom atround() function --- advtrains/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'advtrains/init.lua') diff --git a/advtrains/init.lua b/advtrains/init.lua index 6f81a40..8991025 100644 --- a/advtrains/init.lua +++ b/advtrains/init.lua @@ -251,7 +251,7 @@ advtrains.avt_save = function(remove_players_from_wagons) local v=advtrains.merge_tables(train) --then invalidate if v.index then - v.restore_add_index=v.index-math.floor(v.index+0.5) + v.restore_add_index=v.index-math.floor(v.index+1) end v.path=nil v.path_dist=nil -- cgit v1.2.3