From 4f823e70f24e3c7eb8aa4d521aa95bd714936f9c Mon Sep 17 00:00:00 2001 From: "Ghostrider [GRG]" Date: Tue, 27 Nov 2018 21:26:43 -0500 Subject: [PATCH] Fix issue with _blck_AllMissionAI Calculations of the number of AI killed that trigger mission completion were incorrect. This has been addressed. --- .../Compiles/Missions/GMS_fnc_missionSpawner.sqf | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf index bdf2de6..2f27578 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_missionSpawner.sqf @@ -444,14 +444,8 @@ 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}; -}; +_minNoAliveForCompletion = (count _blck_AllMissionAI) - (round(blck_killPercentage * (count _blck_AllMissionAI))); +if (_secureAsset) then {_minNoAliveForCompletion = _minNoAliveForCompletion + 1}; while {_missionComplete isEqualTo -1} do {