Skip to content

Commit

Permalink
added RPT logging to fnc_exitAFK.sqf
Browse files Browse the repository at this point in the history
  • Loading branch information
johndm22 committed Aug 24, 2022
1 parent 14b4bc6 commit 6a530bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions addons/core/functions/fnc_exitAFK.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

if (!hasInterface) exitWith {};

This comment has been minimized.

Copy link
@SiegeToaster

SiegeToaster Aug 24, 2022

Member

in the exitWith, log that the function was not executed on a client machine. See https://github.com/Soliders-in-Arms-Arma-3-Group/sia3f/blob/main/addons/radio/functions/fnc_acreRadioSetup.sqf#L28-L30 for an example.

LOG("fnc_exitAFK.sqf started.");

private _unit = player; // ToDo: replace with param & execute func on server

Expand All @@ -24,8 +25,11 @@ if ("@ace" call FUNC(checkModPresence)) then {
private _serializedMedStatus = _unit getVariable [QGVAR(serializedMedStatus), "{}"];
[_unit, _serializedMedStatus] call ace_medical_fnc_deserializeState;
};
LOG("fnc_exitAFK.sqf deserialized player.");

This comment has been minimized.

Copy link
@SiegeToaster

SiegeToaster Aug 24, 2022

Member

Also log _unit and _serializedMedStatus with TRACE_2


[(name _unit + " is no longer AFK.")] remoteExec ["systemChat"]; // "<player> is no longer AFK." system chat message.
[] spawn { sleep 60; _unit setVariable [QGVAR(isAFK), false]; }; // Time out for 60 seconds.

5 cutText ["", "PLAIN", -1, true];

INFO("fnc_exitAFK.sqf executed.");

0 comments on commit 6a530bd

Please sign in to comment.