mirror of
https://github.com/DoomKitty87/seafoam.git
synced 2024-12-27 23:47:24 +01:00
fixed line of sight checking
This commit is contained in:
parent
3b724b6a6c
commit
5e15a3e827
1 changed files with 1 additions and 1 deletions
|
@ -333,7 +333,7 @@
|
|||
const xdist = tailx - headx;
|
||||
const ydist = taily - heady;
|
||||
const zdist = tailz - headz;
|
||||
const interval = Math.floor(Math.sqrt(xdist * xdist + ydist * ydist + zdist * zdist));
|
||||
const interval = xdist + ydist + zdist;
|
||||
for (var j = 1; j < interval; j++) {
|
||||
const x = Math.round(headx + j * xdist / interval);
|
||||
const y = Math.round(heady + j * ydist / interval);
|
||||
|
|
Loading…
Reference in a new issue