diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/scripting/lua.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index b29ae74d..ad4806c9 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -1585,7 +1585,8 @@ static int get_beings_in_rectangle(lua_State *s) { Being *b = *i; char t = b->getType(); - if (t == OBJECT_NPC || t == OBJECT_CHARACTER || t == OBJECT_MONSTER) + if ((t == OBJECT_NPC || t == OBJECT_CHARACTER || t == OBJECT_MONSTER) && + rect.contains(b->getPosition())) { lua_pushlightuserdata(s, b); lua_rawseti(s, tableStackPosition, tableIndex); |