mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Fixed issue where spawn packets were sent on zone out. Added all npcs to Camp Bearded Rock. Rewrote how mapobjs get loaded in, no more hardcodes. Added tons mapobjs to the DB. Added ferry npcs.
This commit is contained in:
@@ -15,4 +15,15 @@ end
|
||||
function getAngleFacing(x, y, targetX, targetY)
|
||||
angle = math.atan2(targetX - x, targetY - y);
|
||||
return angle;
|
||||
end
|
||||
|
||||
function getDistanceBetweenActors(actor1, actor2)
|
||||
local pos1 = actor1:GetPos();
|
||||
local pos2 = actor2:GetPos();
|
||||
|
||||
local dx = pos1[0] - pos2[0];
|
||||
local dy = pos1[1] - pos2[1]
|
||||
local dz = pos1[2] - pos2[2]
|
||||
|
||||
return math.sqrt(dx * dx + dy * dy + dz *dz);
|
||||
end
|
||||
Reference in New Issue
Block a user