Loading

Paste #pi7t1u5xo

  1. diff --git a/CorsixTH/Lua/world.lua b/CorsixTH/Lua/world.lua
  2. index 507be42..99c6df1 100644
  3. --- a/CorsixTH/Lua/world.lua
  4. +++ b/CorsixTH/Lua/world.lua
  5. @@ -1636,10 +1636,9 @@ in a room.
  6.  !return (boolean) whether all checks hold.
  7.  --]]
  8.  function World:isTileEmpty(x, y, not_in_room)
  9. -  for _, entity in ipairs(self.entities) do
  10. -    if entity.tile_x == x and entity.tile_y == y then
  11. -      return false
  12. -    end
  13. +  if #self.entity_map.getHumanoidsAtCoordinate(x, y) ~= 0 or
  14. +      #self.entity_map.getObjectsAtCoordinate(x, y) ~= 0 then
  15. +    return false
  16.    end
  17.    if not_in_room then
  18.      return self:getRoom(x, y) == nil

Comments