change milsim_respawn to milsim_reinsert
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
// if at least 1 player in the queue has been waiting longer than the configured timeout, notify all players
|
||||
private _timeout = missionNamespace getVariable ["milsim_respawn_setting_reinsertion_max_wait", 60*20]; // default 20 minutes
|
||||
private _timeoutPlayers = milsim_respawn_reinsertionQueue select {
|
||||
private _timeout = missionNamespace getVariable ["milsim_reinsert_setting_reinsertion_max_wait", 60*20]; // default 20 minutes
|
||||
private _timeoutPlayers = milsim_reinsert_reinsertionQueue select {
|
||||
_x params ["_player", "_base", "_timeFiled"];
|
||||
alive (_player) &&
|
||||
(diag_tickTime - (_timeFiled)) > _timeout
|
||||
@@ -10,10 +10,10 @@ private _timeoutPlayers = milsim_respawn_reinsertionQueue select {
|
||||
if (count _timeoutPlayers > 0) then {
|
||||
// GLOBAL CBA NOTIFY
|
||||
private _playerLines = [["Players are still waiting for Re-insert!", 1.2, [1, 0.64, 0, 1]]];
|
||||
private _maxRangeToReady = missionNamespace getVariable ["milsim_respawn_setting_reinsertion_maxRangeToReady", 400];
|
||||
private _maxRangeToReady = missionNamespace getVariable ["milsim_reinsert_setting_reinsertion_maxRangeToReady", 400];
|
||||
|
||||
// get base objects from queue
|
||||
private _basesWithPeople = (missionNamespace getVariable ["milsim_respawn_reinsertionQueue", []]) apply {_x#1};
|
||||
private _basesWithPeople = (missionNamespace getVariable ["milsim_reinsert_reinsertionQueue", []]) apply {_x#1};
|
||||
// get unique base objects
|
||||
private _basesWithPeople = _basesWithPeople arrayIntersect _basesWithPeople;
|
||||
|
||||
@@ -21,7 +21,7 @@ if (count _timeoutPlayers > 0) then {
|
||||
private _thisBase = _x;
|
||||
|
||||
// Add line for base name
|
||||
_playerLines pushBack ([[_thisBase] call milsim_respawn_fnc_getBaseName, 1, [0,1,0,1]]);
|
||||
_playerLines pushBack ([[_thisBase] call milsim_reinsert_fnc_getBaseName, 1, [0,1,0,1]]);
|
||||
|
||||
// Get players under this base
|
||||
private _thisBasePlayers = _timeoutPlayers select {_x#1 isEqualTo _thisBase};
|
||||
@@ -35,7 +35,7 @@ if (count _timeoutPlayers > 0) then {
|
||||
{ // for each player under this base, add a line
|
||||
_x params ["_player", "_base", "_timeFiled"];
|
||||
// get the closest base to the player
|
||||
private _nearestBase = [_player] call milsim_respawn_fnc_getNearestBase;
|
||||
private _nearestBase = [_player] call milsim_reinsert_fnc_getNearestBase;
|
||||
|
||||
// add player to array of players under bases
|
||||
_playerLines pushBack ([format [
|
||||
@@ -47,9 +47,9 @@ if (count _timeoutPlayers > 0) then {
|
||||
|
||||
// log to rpt
|
||||
private _logParams = [
|
||||
["filedAtBase", [_base] call milsim_respawn_fnc_getBaseName],
|
||||
["filedAtBase", [_base] call milsim_reinsert_fnc_getBaseName],
|
||||
["filedAtBaseDistance", _player distance _base],
|
||||
["closestBase", [_nearestBase] call milsim_respawn_fnc_getBaseName],
|
||||
["closestBase", [_nearestBase] call milsim_reinsert_fnc_getBaseName],
|
||||
["closestBaseDistance", _player distance _nearestBase],
|
||||
["maxDistanceSetting", _maxRangeToReady],
|
||||
["inQueueDuration", diag_tickTime - _timeFiled]
|
||||
@@ -66,5 +66,5 @@ if (count _timeoutPlayers > 0) then {
|
||||
// SEND NOTIFY
|
||||
_playerLines remoteExec ["CBA_fnc_notify", [0, -2] select isDedicated];
|
||||
// RESET NOTIFICATION TIMER
|
||||
milsim_respawn_reinsertionOverTimeoutLastNotificationTime = diag_tickTime;
|
||||
milsim_reinsert_reinsertionOverTimeoutLastNotificationTime = diag_tickTime;
|
||||
};
|
||||
Reference in New Issue
Block a user