1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2024-12-27 03:10:24 +01:00

pressure logic: abms.lua: fix invocation bug for directionality callback accidentally passing origin data to neighbour's directionfn

This commit is contained in:
thetaepsilon-gamedev 2017-10-19 12:13:44 +01:00
parent 3a85152e4d
commit efcec7bdce

View File

@ -166,7 +166,7 @@ local get_neighbour_positions = function(pos, node)
--pipeworks.logger(dname.."directionality test for offset "..formatvec(offset)) --pipeworks.logger(dname.."directionality test for offset "..formatvec(offset))
local towards_origin = vector.multiply(offset, -1) local towards_origin = vector.multiply(offset, -1)
--pipeworks.logger(dname.."vector passed to directionfn: "..formatvec(towards_origin)) --pipeworks.logger(dname.."vector passed to directionfn: "..formatvec(towards_origin))
local result = directional.directionfn(node, towards_origin) local result = directional.directionfn(neighbour, towards_origin)
--pipeworks.logger(dname.."result: "..tostring(result)) --pipeworks.logger(dname.."result: "..tostring(result))
if result then if result then
local n = get_pressure_access(npos) local n = get_pressure_access(npos)