fix/killfeed round distance
This commit is contained in:
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dayzr-bot",
|
"name": "dayzr-bot",
|
||||||
"version": "11.2.2",
|
"version": "11.2.3",
|
||||||
"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": {
|
||||||
|
|||||||
@@ -114,13 +114,13 @@ module.exports = {
|
|||||||
info.bodyPart = data[9];
|
info.bodyPart = data[9];
|
||||||
info.damage = data[10];
|
info.damage = data[10];
|
||||||
info.weapon = data[12];
|
info.weapon = data[12];
|
||||||
info.distance = killedBy == Templates.Melee ? 0 : data[13].toFixed(2);
|
info.distance = killedBy == Templates.Melee ? 0 : parseFloat(data[13]).toFixed(2);
|
||||||
} else if (killedBy == Templates.Killed) {
|
} else if (killedBy == Templates.Killed) {
|
||||||
info.killer = data[5];
|
info.killer = data[5];
|
||||||
info.killerID = data[6];
|
info.killerID = data[6];
|
||||||
info.killerPOS = data[7].split(', ').map(v => parseFloat(v));
|
info.killerPOS = data[7].split(', ').map(v => parseFloat(v));
|
||||||
info.weapon = data[8];
|
info.weapon = data[8];
|
||||||
info.distance = data[9].toFixed(2);
|
info.distance = parseFloat(data[9]).toFixed(2);
|
||||||
}
|
}
|
||||||
else if (killedBy == Templates.Vehicle) info.causeOfDeath = data[6];
|
else if (killedBy == Templates.Vehicle) info.causeOfDeath = data[6];
|
||||||
else if (killedBy == Templates.Explosion) info.causeOfDeath = data[5];
|
else if (killedBy == Templates.Explosion) info.causeOfDeath = data[5];
|
||||||
|
|||||||
Reference in new issue
Block a user