1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-06-30 07:30:22 +02:00

Removed two global variables in mobs/api.lua

This commit is contained in:
LeMagnesium 2015-06-22 18:47:20 +02:00
parent 94417bcafc
commit deb61da142

View File

@ -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