mirror of
https://github.com/rambo/arma3_missions.git
synced 2024-08-30 16:52:13 +00:00
trying to fix issues when having actually multiple players, seems like a game of whack-a-mole
This commit is contained in:
parent
66520a76c8
commit
f7d7965d4f
@ -9,7 +9,9 @@ _prevLZ = _this select 2;
|
||||
_playerno = _this select 3;
|
||||
_player = playersArray select _playerno;
|
||||
|
||||
if (!!(taskIdsArray select _playerno)) exitWith { diag_log format["createObj: Task %1 already exists for %2", (taskIdsArray select _playerno), _playerno] };
|
||||
if ((playersArray select _playerno) isEqualTo false) exitWith { diag_log format["createObj: no such player %1", _playerno] };
|
||||
|
||||
if (!((taskIdsArray select _playerno) isEqualTo false)) exitWith { diag_log format["createObj: Task %1 already exists for %2", (taskIdsArray select _playerno), _playerno] };
|
||||
|
||||
|
||||
_lzLoc = (lzList - [_prevLZ]) call BIS_fnc_SelectRandom;
|
||||
@ -72,6 +74,7 @@ if (!!(ferryingArray select _playerno)) then
|
||||
_longdesc = _longdesc + "<br/><strong>Be advised:</strong> LZ is hot";
|
||||
};
|
||||
};
|
||||
_longdesc = _longdesc + format["<br/>Land within %1m", lzSize];
|
||||
|
||||
_taskid = format["p%1_lz%2", _playerno, _lzLoc];
|
||||
[[_player, west],[_taskid],[_longdesc, _shortdesc, _shortestDesc],(getPos _lzLoc),"AUTOASSIGNED",1,true, "move", true] call BIS_fnc_taskCreate;
|
||||
|
@ -65,7 +65,7 @@ for [{_iX = 0}, {_iX < _maxplayers}, {_iX = _iX + 1}] do
|
||||
ferryingArray set [_iX, false];
|
||||
landingCompleteArray set [_iX, false];
|
||||
squadLoadedArray set [_iX, false];
|
||||
playersArray set [_iX, ""];
|
||||
playersArray set [_iX, false];
|
||||
taskIdsArray set [_iX, false];
|
||||
trigIdsArray set [_iX, false];
|
||||
};
|
||||
|
@ -9,6 +9,7 @@ _playerno = _this select 4;
|
||||
diag_log format["landingComplete called, _this: %1", _this];
|
||||
|
||||
|
||||
|
||||
_vehiclePlayer = vehicle (playersArray select _playerno);
|
||||
|
||||
deletevehicle _trg;
|
||||
|
@ -3,9 +3,14 @@ _evt = _this select 0;
|
||||
_target = _evt select 0;
|
||||
_playerno = _this select 1;
|
||||
|
||||
_taskid = taskIdsArray select _playerno;
|
||||
null = [_taskid, "FAILED", False] spawn BIS_fnc_taskSetState;
|
||||
[_taskid] call BIS_fnc_deleteTask;
|
||||
if (!((taskIdsArray select _playerno) isEqualTo player)) exitWith { diag_log format["playerkilled: %1 != %2", (taskIdsArray select _playerno), player] };
|
||||
|
||||
if (!((taskIdsArray select _playerno) isEqualTo false)) then
|
||||
{
|
||||
_taskid = taskIdsArray select _playerno;
|
||||
null = [_taskid, "FAILED", False] spawn BIS_fnc_taskSetState;
|
||||
[_taskid] call BIS_fnc_deleteTask;
|
||||
};
|
||||
taskIdsArray set [_playerno, false];
|
||||
|
||||
// for some reason this either like so or with !! causes compile error
|
||||
|
Loading…
Reference in New Issue
Block a user