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",
|
||||
"version": "10.3.0",
|
||||
"version": "10.3.1",
|
||||
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
|
||||
"main": "index.js",
|
||||
"nodemonConfig": {
|
||||
|
||||
@@ -115,7 +115,7 @@ module.exports = {
|
||||
let lastDist = 1000000;
|
||||
let destination_dir;
|
||||
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) {
|
||||
tempDest = destinations[i].name;
|
||||
lastDist = distance;
|
||||
|
||||
Reference in new issue
Block a user