Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Commit

Permalink
Kill Tracker - Fix reported unit type (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
mharis001 authored Mar 25, 2020
1 parent 263b15b commit c600fd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addons/killtracker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand Down
7 changes: 3 additions & 4 deletions addons/killtracker/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/*
class CfgDebriefingSections {
class acex_killTracker {
title = "Acex Killed Events";
title = "ACEX Killed Events";
variable = "acex_killTracker_outputText";
};
};
Expand Down Expand Up @@ -54,7 +54,6 @@ GVAR(killCount) = 0;
GVAR(outputText) = (format ["Total Kills: %1<br/>", GVAR(killCount)]) + (GVAR(eventsArray) joinString "<br/>");
}] call CBA_fnc_addEventHandler;


["ace_killed", {
params ["_unit", "_causeOfDeath", "_killer", "_instigator"];
TRACE_4("ace_killed EH",_unit,_causeOfDeath,_killer,_instigator);
Expand Down Expand Up @@ -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")];
};
Expand All @@ -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);
Expand Down

0 comments on commit c600fd2

Please sign in to comment.