mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-23 08:20:21 +01:00
fixed crash if mobs attack and player leave
This commit is contained in:
parent
89238d025f
commit
efd14421f8
@ -961,6 +961,7 @@ end
|
|||||||
|
|
||||||
local s = self.object:getpos()
|
local s = self.object:getpos()
|
||||||
local p = self.attack.player:getpos()
|
local p = self.attack.player:getpos()
|
||||||
|
if not s or not p then return end
|
||||||
p.y = p.y - .5
|
p.y = p.y - .5
|
||||||
s.y = s.y + .5
|
s.y = s.y + .5
|
||||||
local dist = ((p.x - s.x) ^ 2 + (p.y - s.y) ^ 2 + (p.z - s.z) ^ 2) ^ 0.5
|
local dist = ((p.x - s.x) ^ 2 + (p.y - s.y) ^ 2 + (p.z - s.z) ^ 2) ^ 0.5
|
||||||
|
Loading…
Reference in New Issue
Block a user