mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-18 16:20: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()
|
obj = oir:get_luaentity()
|
||||||
if obj and obj.type == "monster" then
|
if obj and obj.type == "monster" then
|
||||||
-- attack monster
|
-- attack monster
|
||||||
p = obj.object:getpos()
|
local p = obj.object:getpos()
|
||||||
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
|
||||||
if dist < min_dist then
|
if dist < min_dist then
|
||||||
min_dist = dist
|
min_dist = dist
|
||||||
min_player = obj.object
|
min_player = obj.object
|
||||||
|
Loading…
Reference in New Issue
Block a user