ready for dedi -- improvements to resupply, triageIcons too

This commit is contained in:
2024-02-06 17:36:01 -08:00
parent 0a64d9e170
commit 91b982e06e
44 changed files with 586 additions and 354 deletions

View File

@@ -43,7 +43,7 @@ if (count _timeoutPlayers > 0) then {
_playerLines pushBack ([format [
"%1: %2 [%3]",
groupID (group (_player)),
name (_player),
name _player,
[diag_tickTime - (_timeFiled), "MM:SS"] call BIS_fnc_secondsToString
], 0.8, [0.8, 0.8, 0.8, 1]]);

View File

@@ -4,21 +4,23 @@ params [["_player", objNull, [objNull]]];
if (!isServer) exitWith {
[
"respawn_reinsertion",
LEVEL_ERROR,
QUOTE(COMPONENT),
"ATTEMPTED RUN ON CLIENT",
[
["player", _player]
]
] call milsim_util_fnc_log;
] call EFUNC(common,log);
};
if (isNull _player) exitWith {
[
"respawn_reinsertion",
LEVEL_ERROR,
QUOTE(COMPONENT),
"NULL PARAMETERS",
[
["player", _player]
]
] call milsim_util_fnc_log;
] call EFUNC(common,log);
};
// get entries for this player from queue
@@ -43,17 +45,16 @@ publicVariable QGVAR(reinsertionQueue);
// get the closest base to the player
private _nearestBase = [_player] call EFUNC(common,getNearestBase);
// log to rpt
private _logParams = [
["filedAtBase", [_base] call EFUNC(common,getNameOfBase)],
["filedAtBaseDistance", _player distance _base],
["closestBase", [_nearestBase] call EFUNC(common,getNameOfBase)],
["closestBaseDistance", _player distance _nearestBase],
["maxDistanceSetting", _maxRangeToReady],
["inQueueDuration", diag_tickTime - _timeFiled]
];
_logParams = [_player, _logParams] call EFUNC(common,addPlayerInfoToArray);
[
"respawn_reinsertion",
LEVEL_INFO,
QUOTE(COMPONENT),
"PLAYER RESCINDED REQUEST",
_logParams
] call milsim_util_fnc_log;
[_player, [
["filedAtBase", [_base] call EFUNC(common,getNameOfBase)],
["filedAtBaseDistance", _player distance _base],
["closestBase", [_nearestBase] call EFUNC(common,getNameOfBase)],
["closestBaseDistance", _player distance _nearestBase],
["maxDistanceSetting", _maxRangeToReady],
["inQueueDuration", diag_tickTime - _timeFiled]
]] call EFUNC(common,addPlayerInfoToArray)
] call EFUNC(common,log);

View File

@@ -7,6 +7,8 @@
Author: IndigoFox
*/
#include "..\script_component.hpp"
if (not isRemoteExecuted) exitWith {
diag_log text format ["[milsim] (respawn_reinsertion) SHOW QUEUE NOT REMOTE EXECUTED"];
};
@@ -25,12 +27,12 @@ if (isNull _userObject) exitWith {
};
// log to rpt
private _logParams = [_userObject, []] call EFUNC(common,addPlayerInfoToArray);
[
"respawn_reinsertion",
LEVEL_INFO,
QUOTE(COMPONENT),
"SHOW QUEUE REQUESTED",
_logParams
] call milsim_util_fnc_log;
[_userObject] call EFUNC(common,addPlayerInfoToArray)
] call EFUNC(common,log);
private _queue = missionNamespace getVariable [QGVAR(reinsertionQueue), []];
// get base objects from queue

View File

@@ -15,8 +15,6 @@ private _maxRangeToReady = missionNamespace getVariable [QGVAR(setting_maxRangeT
if (not _isCloseEnoughToAnyBase || not (alive _player)) then {
// don't include player in updated queue
// log to rpt
private _logParams = ;
_logParams = ;
[
LEVEL_INFO,
QUOTE(COMPONENT),
@@ -38,20 +36,19 @@ private _maxRangeToReady = missionNamespace getVariable [QGVAR(setting_maxRangeT
_stillValid pushBackUnique [_player, _nearestBase, _timeFiled];
// if player's base has changed, log to rpt
if (_base != _nearestBase) then {
private _logParams = [
["filedAtBase", [_base] call EFUNC(common,getNameOfBase)],
["filedAtBaseDistance", _player distance _base],
["closestBase", [_nearestBase] call EFUNC(common,getNameOfBase)],
["closestBaseDistance", _player distance _nearestBase],
["maxDistanceSetting", _maxRangeToReady],
["inQueueDuration", diag_tickTime - _timeFiled]
];
_logParams = [_player, _logParams] call EFUNC(common,addPlayerInfoToArray);
[
"respawn_reinsertion",
LEVEL_INFO,
QUOTE(COMPONENT),
"PLAYER BASE WAS UPDATED",
_logParams
] call milsim_util_fnc_log;
[_player, [
["filedAtBase", [_base] call EFUNC(common,getNameOfBase)],
["filedAtBaseDistance", _player distance _base],
["closestBase", [_nearestBase] call EFUNC(common,getNameOfBase)],
["closestBaseDistance", _player distance _nearestBase],
["maxDistanceSetting", _maxRangeToReady],
["inQueueDuration", diag_tickTime - _timeFiled]
]] call EFUNC(common,addPlayerInfoToArray)
] call EFUNC(common,log);
};
} forEach GVAR(reinsertionQueue);