mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 01:30:38 +01:00
Removed two global variables in mobs/api.lua
This commit is contained in:
parent
94417bcafc
commit
deb61da142
@ -380,8 +380,8 @@ function mobs:register_mob(name, def)
|
||||
obj = oir:get_luaentity()
|
||||
if obj and obj.type == "monster" then
|
||||
-- attack monster
|
||||
p = obj.object:getpos()
|
||||
dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
|
||||
local p = obj.object:getpos()
|
||||
local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
|
||||
if dist < min_dist then
|
||||
min_dist = dist
|
||||
min_player = obj.object
|
||||
|
Loading…
Reference in New Issue
Block a user