Skip to content

Commit

Permalink
fix: Fixed Double-Counting
Browse files Browse the repository at this point in the history
The fix had existed in the mission I ran a couple weeks back, some reason didn't copy it across when I was bringing this repo in line.
  • Loading branch information
cow-co committed Nov 24, 2024
1 parent 18a5f8d commit 4d1593a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions components/statsTracking/fn_addStatsEventHandlersToClass.sqf
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Adds event handlers to the given unit, to track various stats for viewing on the debriefing.
// These event handlers are local to the client, and the data they collect is relevant only
// to the client, so we don't need to sync the data across the network.
params ["_unit"];

// TODO Ensure these do run locally and not globally
if !(_unit isEqualTo player) exitWith {};

if (hasInterface) then {
["ace_firedPlayer", {
Expand Down Expand Up @@ -40,4 +41,4 @@ if (hasInterface) then {
_text = _text + format ["You went unconscious %1 times<br/>", _uncons];
missionNamespace setVariable ["cafe_playerStatsStr", _text, false];
}];
};
};
2 changes: 1 addition & 1 deletion description.ext
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ class Extended_InitPost_EventHandlers
#ifdef ENABLE_EXTENDED_STATS
class addStatsEventHandlers
{
init = "[] call f_fnc_addStatsEventHandlersToClass";
init = "_this call f_fnc_addStatsEventHandlersToClass";
};
#endif

Expand Down

0 comments on commit 4d1593a

Please sign in to comment.