56 lines
1.3 KiB
Plaintext
56 lines
1.3 KiB
Plaintext
params [
|
|
["_player", objNull, [objNull]],
|
|
["_base", objNull, [objNull]],
|
|
["_timeFiled", diag_tickTime, [25]]
|
|
];
|
|
|
|
if (!isServer) exitWith {
|
|
[
|
|
"respawn_reinsertion",
|
|
"ATTEMPTED RUN ON CLIENT",
|
|
[
|
|
["player", _player],
|
|
["base", _base]
|
|
]
|
|
] call milsim_fnc_log;
|
|
};
|
|
if (
|
|
isNull _player ||
|
|
isNull _base
|
|
) exitWith {
|
|
[
|
|
"respawn_reinsertion",
|
|
"NULL PARAMETERS",
|
|
[
|
|
["player", _player],
|
|
["base", _base]
|
|
]
|
|
] call milsim_fnc_log;
|
|
};
|
|
|
|
|
|
private _maxRangeToReady = missionNamespace getVariable ["milsim_respawn_setting_reinsertion_maxRangeToReady", 400];
|
|
// nearest base here is the same as the base sent
|
|
private _nearestBase = _base;
|
|
|
|
milsim_respawn_reinsertionQueue pushBackUnique [
|
|
_player, _base, _timeFiled
|
|
];
|
|
// broadcast new list to all machines
|
|
publicVariable "milsim_respawn_reinsertionQueue";
|
|
|
|
// log to rpt
|
|
private _logParams = [
|
|
["filedAtBase", [_base] call milsim_respawn_fnc_getBaseName],
|
|
["filedAtBaseDistance", _player distance _base],
|
|
["closestBase", [_nearestBase] call milsim_respawn_fnc_getBaseName],
|
|
["closestBaseDistance", _player distance _nearestBase],
|
|
["maxDistanceSetting", _maxRangeToReady],
|
|
["inQueueDuration", diag_tickTime - _timeFiled]
|
|
];
|
|
_logParams = [_player, _logParams] call milsim_fnc_addPlayerInfoToArray;
|
|
[
|
|
"respawn_reinsertion",
|
|
"PLAYER FILED REQUEST",
|
|
_logParams
|
|
] call milsim_fnc_log; |