Added Case for debugging with forced completion of spawned mission.

This commit is contained in:
Chris Cardozo
2020-10-04 15:50:48 -04:00
parent 6931695295
commit 34204ccdc6
2 changed files with 14 additions and 0 deletions

View File

@ -161,6 +161,16 @@ switch (_endCondition) do
[_coords,_mines,_objects,_hiddenObjects,_blck_AllMissionAI,_markerName,cleanupAliveAITimer,cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup;
};
case 5: {
#define cleanupCompositionTimer 0
#define cleanupAliveAITimer 0
{
if (local _x) then {deleteVehicle _x};
}forEach _crates;
[_coords,_mines,_objects,_hiddenObjects,_blck_AllMissionAI,_markerName,cleanupAliveAITimer,cleanupCompositionTimer,_isScubaMission] call _fn_missionCleanup;
};
};
blck_missionsRun = blck_missionsRun + 1;

View File

@ -397,6 +397,7 @@ for "_i" from 1 to (count blck_activeMissionsList) do
};
try {
if (blck_debugLevel >= 4) throw 5;
private _playerIsNear = [_crates,20,true] call blck_fnc_playerInRangeArray;
private _minNoAliveForCompletion = (count _blck_AllMissionAI) - (round(blck_killPercentage * (count _blck_AllMissionAI)));
private _aiKilled = if (({alive _x} count _blck_AllMissionAI) <= _minNoAliveForCompletion) then {true} else {false}; // mission complete
@ -555,6 +556,9 @@ for "_i" from 1 to (count blck_activeMissionsList) do
case 4: { // Reserved for grpNull errors in the future
};
case 5: {
[_coords,_mines,_objects,_hiddenObjects,_crates,_blck_AllMissionAI,_assetKilledMsg,_markers,markerPos (_markers select 1),_markerName,_markerMissionName, _exception] call blck_fnc_endMission;
}
};
};
};