mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
Repositioned LaNoscea and Shroud Aetherytes. Linked them up too. Teleporting to one now causes you to appear *near* it, and facing it.
This commit is contained in:
parent
844f21d9a4
commit
9505cd71be
7 changed files with 98 additions and 110 deletions
18
data/scripts/utils.lua
Normal file
18
data/scripts/utils.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
--[[
|
||||
|
||||
Helper Utils
|
||||
|
||||
--]]
|
||||
|
||||
function getRandomPointInBand(originX, originY, minRadius, maxRadius)
|
||||
angle = math.random() * math.pi * 2;
|
||||
radius =(math.sqrt(math.random()) * (maxRadius-minRadius)) + minRadius;
|
||||
x = radius * math.cos(angle);
|
||||
y = radius * math.sin(angle);
|
||||
return {x=x+originX,y=y+originY};
|
||||
end
|
||||
|
||||
function getAngleFacing(x, y, targetX, targetY)
|
||||
angle = math.atan2(targetX - x, targetY - y);
|
||||
return angle;
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue