From 34f210ef6524e7c131e98d9dad3fed5aa23f363d Mon Sep 17 00:00:00 2001 From: 1F616EMO Date: Wed, 6 Sep 2023 17:55:20 +0800 Subject: [PATCH] [BUGFIX] Fix player out of border detection --- mods/rp_core/player.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/rp_core/player.lua b/mods/rp_core/player.lua index fde57da..2181b11 100644 --- a/mods/rp_core/player.lua +++ b/mods/rp_core/player.lua @@ -54,11 +54,11 @@ local function check_pos(pos) pos.x = rp_core.area[2][1] + 5 altered = true end - if pos.y < (rp_core.area[1][2] - 10) then - pos.y = rp_core.area[1][2] - 5 + if pos.z < (rp_core.area[1][2] - 10) then + pos.z = rp_core.area[1][2] - 5 altered = true - elseif pos.y > (rp_core.area[2][2] + 10) then - pos.y = rp_core.area[2][2] + 5 + elseif pos.z > (rp_core.area[2][2] + 10) then + pos.z = rp_core.area[2][2] + 5 altered = true end return pos, altered