Version : 41.65
SP/MP: Both
Rest is not important - bug report is about code mistake I found, not specific game bug. Nonetheless this mistake is likely cause of some specific game related bugs.
While working on my mod and repurposing one of native functions: "AdjacentFreeTileFinder.privTrySquareForWalls" from ".../media/lua/shared/util/AdjacentFreeTileFinder.lua" I found the bug in the native function. It seems to be small syntax error but it causes improper function operation. In case of my adjusted function this mistake was causing improper detection (lack of it) of walls separating diagonal tiles.
if src:getX() ~= test:getX() and src:getY() ~= test:getY() then
if not AdjacentFreeTileFinder.privTrySquareForWalls2(src, test:getX(), src:getY(), src:getZ() or --line 31 lacks one ")"
not AdjacentFreeTileFinder.privTrySquareForWalls2(src, src:getX(), test:getY(), src:getZ()) or
not AdjacentFreeTileFinder.privTrySquareForWalls2(test, test:getX(), src:getY(), src:getZ()) or
not AdjacentFreeTileFinder.privTrySquareForWalls2(test, src:getX(), test:getY(), src:getZ())) then --line 34 has one ")" too many
return false
end
end
I hope that this small bug report helps you with making it even greater game!