From c600fd2d50306692d2d82893aaa695c9a479ec28 Mon Sep 17 00:00:00 2001
From: mharis001 <34453221+mharis001@users.noreply.github.com>
Date: Tue, 24 Mar 2020 20:55:58 -0400
Subject: [PATCH] Kill Tracker - Fix reported unit type (#227)
---
addons/killtracker/README.md | 2 +-
addons/killtracker/XEH_postInit.sqf | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/addons/killtracker/README.md b/addons/killtracker/README.md
index d496f877..7aec2c24 100644
--- a/addons/killtracker/README.md
+++ b/addons/killtracker/README.md
@@ -8,7 +8,7 @@ Note: Requires config setup in a mission's description.ext - has no effect if mi
```powershell
class CfgDebriefingSections {
class acex_killTracker {
- title = "Acex Killed Events";
+ title = "ACEX Killed Events";
variable = "acex_killTracker_outputText";
};
};
diff --git a/addons/killtracker/XEH_postInit.sqf b/addons/killtracker/XEH_postInit.sqf
index ec3c78d0..ff24c7b4 100644
--- a/addons/killtracker/XEH_postInit.sqf
+++ b/addons/killtracker/XEH_postInit.sqf
@@ -20,7 +20,7 @@
/*
class CfgDebriefingSections {
class acex_killTracker {
- title = "Acex Killed Events";
+ title = "ACEX Killed Events";
variable = "acex_killTracker_outputText";
};
};
@@ -54,7 +54,6 @@ GVAR(killCount) = 0;
GVAR(outputText) = (format ["Total Kills: %1
", GVAR(killCount)]) + (GVAR(eventsArray) joinString "
");
}] call CBA_fnc_addEventHandler;
-
["ace_killed", {
params ["_unit", "_causeOfDeath", "_killer", "_instigator"];
TRACE_4("ace_killed EH",_unit,_causeOfDeath,_killer,_instigator);
@@ -115,7 +114,7 @@ GVAR(killCount) = 0;
if (_killerIsPlayer) then {
_killerName = [_killer, true, false] call ACEFUNC(common,getName);
} else {
- _killerName = _unit getVariable [QGVAR(aiName), ""]; // allow setting a custom AI name (e.g. VIP Target)
+ _killerName = _killer getVariable [QGVAR(aiName), ""]; // allow setting a custom AI name (e.g. VIP Target)
if (_killerName == "") then {
_killerName = format ["*AI* - %1", getText (configfile >> "CfgVehicles" >> (typeOf _killer) >> "displayName")];
};
@@ -133,7 +132,7 @@ GVAR(killCount) = 0;
} else {
_unitName = _unit getVariable [QGVAR(aiName), ""]; // allow setting a custom AI name (e.g. VIP Target)
if (_unitName == "") then {
- _unitName = format ["*AI* - %1", getText (configfile >> "CfgVehicles" >> (typeOf _killer) >> "displayName")];
+ _unitName = format ["*AI* - %1", getText (configfile >> "CfgVehicles" >> (typeOf _unit) >> "displayName")];
};
};
TRACE_3("send kill event",_killer,_unitName,_killInfo);