Fix sim.neighbours yielding the center particle

The wiki says it shouldn't. Broken in 6a6b14f871.
This commit is contained in:
Tamás Bálint Misius 2023-07-01 16:12:54 +02:00
parent 90004242d6
commit 2c04cf510a
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -2345,6 +2345,10 @@ static int NeighboursClosure(lua_State *l)
r = 0;
}
}
if (cx == px && cy == py)
{
r = 0;
}
if (r)
{
lua_pushnumber(l, x);