fix/caclulateVector parameters
This commit is contained in:
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dayzr-bot",
|
"name": "dayzr-bot",
|
||||||
"version": "10.3.0",
|
"version": "10.3.1",
|
||||||
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
|
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"nodemonConfig": {
|
"nodemonConfig": {
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ module.exports = {
|
|||||||
let lastDist = 1000000;
|
let lastDist = 1000000;
|
||||||
let destination_dir;
|
let destination_dir;
|
||||||
for (let i = 0; i < destinations.length; i++) {
|
for (let i = 0; i < destinations.length; i++) {
|
||||||
let { distance, theta, dir } = calculateVector(info.victimPOS, destinations[i].coord);
|
let { distance, theta, dir } = calculateVector(data.pos, destinations[i].coord);
|
||||||
if (distance < lastDist) {
|
if (distance < lastDist) {
|
||||||
tempDest = destinations[i].name;
|
tempDest = destinations[i].name;
|
||||||
lastDist = distance;
|
lastDist = distance;
|
||||||
|
|||||||
Reference in new issue
Block a user