check modDir to allow rename

This commit is contained in:
2023-04-29 08:35:01 -07:00
parent 8a9b650ce9
commit dc0ba38567
3 changed files with 12 additions and 9 deletions

View File

@@ -18,7 +18,7 @@ class CfgFunctions {
};
};
class RangerMetrics_event {
class functions {
class server {
file = "\RangerMetrics\functions\capture\serverEH";
class ace_unconscious {};
class EntityKilled {};
@@ -30,9 +30,7 @@ class CfgFunctions {
class MarkerUpdated {};
class milsim_serverEfficiency {};
};
};
class RangerMetrics_event {
class functions {
class client {
file = "\RangerMetrics\functions\capture\clientEH";
};
};

View File

@@ -2,11 +2,14 @@
["OnUserConnected", {
params ["_networkId", "_clientStateNumber", "_clientState"];
private _userInfo = (getUserInfo _networkId);
private _tags = [];
if (!isNil "_userInfo") then {
_tags pushBack ["string", "playerUID", _userInfo#2];
_userInfo call RangerMetrics_capture_fnc_player_identity;
_userInfo call RangerMetrics_capture_fnc_player_status;
["server_events", "OnUserConnected", [
["string", "playerUID", _userInfo#2]
], [
};
["server_events", "OnUserConnected",
_tags, [
["string", "networkId", _networkId],
["int", "clientStateNumber", _clientStateNumber],
["string", "clientState", _clientState]

View File

@@ -28,6 +28,8 @@ addMissionEventHandler [
RangerMetrics_callback_fnc_callbackHandler
];
"RangerMetrics" callExtension ["setAddonDir", [configSourceMod (configFile >> "CfgPatches" >> "RangerMetrics")]];
// Deinit to start fresh. See callback handler for the remainder of async init code
"RangerMetrics" callExtension "deinitExtension";