1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2024-12-26 02:40:23 +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))
local towards_origin = vector.multiply(offset, -1)
--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))
if result then
local n = get_pressure_access(npos)