From aa82fa1d1379ca2adc552a5e90cfa9a77da3edd6 Mon Sep 17 00:00:00 2001
From: Lejo <Lejo_1@web.de>
Date: Sun, 09 Dec 2018 15:57:48 +0100
Subject: [PATCH] Forcefield: Remove deprecated update_map() call (#467)

---
 technic/machines/HV/forcefield.lua |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/technic/machines/HV/forcefield.lua b/technic/machines/HV/forcefield.lua
index 230c8b0..7395284 100644
--- a/technic/machines/HV/forcefield.lua
+++ b/technic/machines/HV/forcefield.lua
@@ -42,7 +42,7 @@
 --  |          |
 --   \___/\___/
 
-local function update_forcefield(pos, meta, active, first)
+local function update_forcefield(pos, meta, active)
 	local shape = meta:get_int("shape")
 	local range = meta:get_int("range")
 	local vm = VoxelManip()
@@ -86,11 +86,6 @@
 	vm:set_data(data)
 	vm:update_liquids()
 	vm:write_to_map()
-	-- update_map is very slow, but if we don't call it we'll
-	-- get phantom blocks on the client.
-	if not active or first then
-		vm:update_map()
-	end
 end
 
 local function set_forcefield_formspec(meta)
@@ -273,13 +268,11 @@
 			technic.swap_node(pos, "technic:forcefield_emitter_off")
 		end
 	elseif eu_input >= power_requirement then
-		local first = false
 		if node.name == "technic:forcefield_emitter_off" then
-			first = true
 			technic.swap_node(pos, "technic:forcefield_emitter_on")
 			meta:set_string("infotext", S("%s Active"):format(machine_name))
 		end
-		update_forcefield(pos, meta, true, first)
+		update_forcefield(pos, meta, true)
 	end
 end
 

--
Gitblit v1.8.0