Skip to content

Commit

Permalink
Include the endpoint position in the area size check (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
fluxionary authored Feb 9, 2024
1 parent cba6472 commit f4bb8eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ function areas:canPlayerAddArea(pos1, pos2, name)
self.config.self_protection_max_size_high or
self.config.self_protection_max_size
if
(pos2.x - pos1.x) > max_size.x or
(pos2.y - pos1.y) > max_size.y or
(pos2.z - pos1.z) > max_size.z then
(pos2.x - pos1.x + 1) > max_size.x or
(pos2.y - pos1.y + 1) > max_size.y or
(pos2.z - pos1.z + 1) > max_size.z then
return false, S("Area is too big.")
end

Expand Down

0 comments on commit f4bb8eb

Please sign in to comment.