From 94a77f3e491cec8bd345e5c90f64842bfbb30a7a Mon Sep 17 00:00:00 2001 From: Gerkiz Date: Tue, 23 Nov 2021 22:59:40 +0100 Subject: [PATCH] fix hard game crash bug --- maps/mountain_fortress_v3/ic/minimap.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/maps/mountain_fortress_v3/ic/minimap.lua b/maps/mountain_fortress_v3/ic/minimap.lua index f8a8dfdf..5ec1167d 100644 --- a/maps/mountain_fortress_v3/ic/minimap.lua +++ b/maps/mountain_fortress_v3/ic/minimap.lua @@ -4,8 +4,6 @@ local ICT = require 'maps.mountain_fortress_v3.ic.table' local Functions = require 'maps.mountain_fortress_v3.ic.functions' local Gui = require 'maps.mountain_fortress_v3.ic.gui' -local round = math.round - local function validate_player(player) if not player then return false @@ -144,7 +142,7 @@ local function draw_minimap(player, surface, position) name = 'minimap_frame', position = position, surface_index = surface.index, - zoom = round(player_data.zoom), + zoom = player_data.zoom, tooltip = 'LMB: Increase zoom level.\nRMB: Decrease zoom level.\nMMB: Toggle camera size.' } ) @@ -199,7 +197,7 @@ function Public.toggle_minimap(event) if player_data.zoom < 0.07 then player_data.zoom = 0.07 end - element.zoom = round(player_data.zoom) + element.zoom = player_data.zoom return end if event.button == defines.mouse_button_type.left then @@ -207,7 +205,7 @@ function Public.toggle_minimap(event) if player_data.zoom > 2 then player_data.zoom = 2 end - element.zoom = round(player_data.zoom) + element.zoom = player_data.zoom return end if event.button == defines.mouse_button_type.middle then