mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-12 02:50:25 +01:00
improve arrows trajectoire
This commit is contained in:
parent
d8e2607e7a
commit
1e2bdf6eff
@ -33,12 +33,13 @@ function throwing_get_trajectoire(self, newpos)
|
|||||||
return {newpos}
|
return {newpos}
|
||||||
end
|
end
|
||||||
local coord = {}
|
local coord = {}
|
||||||
local nx = (self.lastpos["x"] - newpos["x"])/3
|
local nx = (newpos["x"] - self.lastpos["x"])/3
|
||||||
local ny = (self.lastpos["y"] - newpos["y"])/3
|
local ny = (newpos["y"] - self.lastpos["y"])/3
|
||||||
local nz = (self.lastpos["z"] - newpos["z"])/3
|
local nz = (newpos["z"] - self.lastpos["z"])/3
|
||||||
|
|
||||||
if nx and ny and nz then
|
if nx and ny and nz then
|
||||||
table.insert(coord, {x=self.lastpos["x"]-nx, y=self.lastpos["y"]-ny ,z=self.lastpos["z"]-nz })
|
table.insert(coord, {x=self.lastpos["x"]+nx, y=self.lastpos["y"]+ny ,z=self.lastpos["z"]+nz })
|
||||||
table.insert(coord, {x=newpos["x"]+nx, y=newpos["y"]+ny ,z=newpos["z"]+nz })
|
table.insert(coord, {x=newpos["x"]-nx, y=newpos["y"]-ny ,z=newpos["z"]-nz })
|
||||||
end
|
end
|
||||||
table.insert(coord, newpos)
|
table.insert(coord, newpos)
|
||||||
return coord
|
return coord
|
||||||
|
Loading…
Reference in New Issue
Block a user