mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-13 14:00:32 +01:00
Fix server crash if filter-injector placed on the right of a connected chest is punched
This commit is contained in:
parent
84e858fccf
commit
1a7c63f6bd
|
@ -144,6 +144,14 @@ local function punch_filter(data, filtpos, filtnode, msg)
|
|||
local dir = minetest.facedir_to_right_dir(filtnode.param2)
|
||||
local frompos = vector.subtract(filtpos, dir)
|
||||
local fromnode = minetest.get_node(frompos)
|
||||
|
||||
-- Fix crash with connected_chests (sys4 fix for MFF)
|
||||
if fromnode.name == "connected_chests:chest_right" then
|
||||
local v_mul = vector.multiply(dir, 2)
|
||||
frompos = vector.subtract(filtpos, v_mul)
|
||||
fromnode = minetest.get_node(frompos)
|
||||
end
|
||||
|
||||
if not fromnode then return end
|
||||
local fromdef = minetest.registered_nodes[fromnode.name]
|
||||
if not fromdef then return end
|
||||
|
|
Loading…
Reference in New Issue
Block a user