Update GMS_fnc_missionSpawner.sqf

This commit is contained in:
Chris Cardozo 2018-11-27 21:36:25 -05:00
parent d52b40457d
commit e1cb05f87d

View File

@ -444,14 +444,9 @@ private _spawnPara = if (random(1) < _chancePara) then {true} else {false};
} forEach _crates;
private["_minNoAliveForCompletion","_result","_minPercentageKilled"];
if (_secureAsset) then
{
_minNoAliveForCompletion = round((1 - blck_killPercentage) * (({alive _x} count _blck_AllMissionAI) - 1));
if (_minNoAliveForCompletion < 2) then {_minNoAliveForCompletion = 2};
} else {
_minNoAliveForCompletion = floor((1 - blck_killPercentage) * ({alive _x} count _blck_AllMissionAI));
if (_minNoAliveForCompletion == 0) then {_minNoAliveForCompletion = 1};
};
//diag_log format["_missionSpawner (447): count _blck_AllMissionAI = %2 || (round(blck_killPercentage * (count _blck_AllMissionAI))) = %1", round(blck_killPercentage * (count _blck_AllMissionAI)), count _blck_AllMissionAI];
_minNoAliveForCompletion = (count _blck_AllMissionAI) - (round(blck_killPercentage * (count _blck_AllMissionAI)));
if (_secureAsset) then {_minNoAliveForCompletion = _minNoAliveForCompletion + 1};
while {_missionComplete isEqualTo -1} do
{