bug fixes
This commit is contained in:
parent
d2d0325498
commit
a1a39799e4
@ -8,6 +8,8 @@
|
||||
#define noActive 2
|
||||
#define waitTime 5
|
||||
|
||||
blck_activeMonitorThreads = blck_activeMonitorThreads + 1;
|
||||
|
||||
for "_i" from 1 to (count blck_activeMissionsList) do
|
||||
{
|
||||
|
||||
@ -127,7 +129,6 @@ for "_i" from 1 to (count blck_activeMissionsList) do
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
switch (_monitorAction) do
|
||||
{
|
||||
|
||||
@ -188,7 +189,12 @@ for "_i" from 1 to (count blck_activeMissionsList) do
|
||||
|
||||
if !(_scubaGroupParameters isEqualTo []) then
|
||||
{
|
||||
_temp = [_coords, _minNoAI,_maxNoAI,_noAIGroups,_scubaGroupParameters,_difficulty,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,_isScubaMission] call blck_fnc_spawnMissionAI;
|
||||
//_umsUniforms = blck_UMS_uniforms;
|
||||
//_umsHeadgear = blck_UMS_headgear;
|
||||
//_umsWeapons = blck_UMS_weapons;
|
||||
//_umsVests = blck_UMS_vests;
|
||||
|
||||
_temp = [_coords, _minNoAI,_maxNoAI,_noAIGroups,_scubaGroupParameters,_difficulty,blck_UMS_uniforms,blck_UMS_headgear,blck_UMS_vests,_backpacks,blck_UMS_weapons,_sideArms,true] call blck_fnc_spawnMissionAI;
|
||||
_temp params["_ai","_abort"];
|
||||
if (_abort) throw 1;
|
||||
_blck_AllMissionAI append (_ai);
|
||||
@ -247,7 +253,7 @@ for "_i" from 1 to (count blck_activeMissionsList) do
|
||||
};
|
||||
uisleep 3;
|
||||
|
||||
if (count _garrisonedBuilding_ATLsystem > 0) then // Note that there is no error checking here for nulGroups
|
||||
if !(_garrisonedBuilding_ATLsystem isEqualTo []) then // Note that there is no error checking here for nulGroups
|
||||
{
|
||||
private _temp = [_coords, _garrisonedBuilding_ATLsystem, _difficulty,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_garrisonBuilding_ATLsystem;
|
||||
if (_temp isEqualTo grpNull) then {throw 1} else
|
||||
@ -260,7 +266,7 @@ for "_i" from 1 to (count blck_activeMissionsList) do
|
||||
};
|
||||
uiSleep 3;
|
||||
|
||||
if (count _garrisonedBuildings_BuildingPosnSystem > 0) then
|
||||
if !(_garrisonedBuildings_BuildingPosnSystem isEqualTo []) then
|
||||
{
|
||||
private _temp = [_coords, _garrisonedBuildings_BuildingPosnSystem, _difficulty,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_garrisonBuilding_RelPosSystem;
|
||||
if (_temp isEqualTo grpNull) then {throw 1} else
|
||||
@ -274,12 +280,13 @@ for "_i" from 1 to (count blck_activeMissionsList) do
|
||||
uiSleep 15;
|
||||
|
||||
private _userelativepos = true;
|
||||
private _noEmplacedWeapons = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange;
|
||||
if (blck_useStatic && ((_noEmplacedWeapons > 0) || count _missionEmplacedWeapons > 0)) then
|
||||
private _emplacedWeaponsThisMission = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange;
|
||||
[format["_monitorInitializedMissions(284): _noEmplacedWeapons = %1 | _emplacedWeaponsThisMission = %2 | _missionEmplacedWeapons = %3",_noEmplacedWeapons,_emplacedWeaponsThisMission,_missionEmplacedWeapons]] call blck_fnc_log;
|
||||
if (blck_useStatic && ((_emplacedWeaponsThisMission > 0) || !(_missionEmplacedWeapons isEqualTo []))) then
|
||||
// TODO: add error checks for grpNull to the emplaced weapon spawner
|
||||
{
|
||||
|
||||
private _temp = [_coords,_missionEmplacedWeapons,_userelativepos,_noEmplacedWeapons,_difficulty,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnEmplacedWeaponArray;
|
||||
private _temp = [_coords,_missionEmplacedWeapons,_userelativepos,_emplacedWeaponsThisMission,_difficulty,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms] call blck_fnc_spawnEmplacedWeaponArray;
|
||||
if (_temp isEqualTo grpNull) then {throw 1} else
|
||||
{
|
||||
_objects append (_temp select 0);
|
||||
@ -288,29 +295,29 @@ for "_i" from 1 to (count blck_activeMissionsList) do
|
||||
};
|
||||
uisleep 10;
|
||||
|
||||
private _noVehiclePatrols = [_noVehiclePatrols] call blck_fnc_getNumberFromRange;
|
||||
if (blck_useVehiclePatrols && ((_noVehiclePatrols > 0) || !(_missionPatrolVehicles isEqualTo []))) then
|
||||
private _noPatrols = [_noVehiclePatrols] call blck_fnc_getNumberFromRange;
|
||||
diag_log format["_monitorInitializeMissions(299): __noVehiclePatrols %1 | _noPatrols %2 | _missionPatrolVehicles %3",_noVehiclePatrols,_noPatrols,_missionPatrolVehicles];
|
||||
if (blck_useVehiclePatrols && ((_noPatrols > 0) || !(_missionPatrolVehicles isEqualTo []))) then
|
||||
{
|
||||
_temp = [_coords,_noVehiclePatrols,_difficulty,_missionPatrolVehicles,_userelativepos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false,_vehicleCrewCount] call blck_fnc_spawnMissionVehiclePatrols;
|
||||
_temp = [_coords,_noPatrols,_difficulty,_missionPatrolVehicles,_userelativepos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false,_vehicleCrewCount] call blck_fnc_spawnMissionVehiclePatrols;
|
||||
// TODO: add grpNull checks to missionVehicleSpawner
|
||||
if (_temp isEqualTo grpNull) throw 1;
|
||||
_missionAIVehicles append (_temp select 0);
|
||||
_blck_AllMissionAI append (_temp select 1);
|
||||
};
|
||||
uiSleep delayTime;
|
||||
if (blck_useVehiclePatrols && ((_noVehiclePatrols > 0) || !(_submarinePatrolParameters isEqualTo []))) then
|
||||
|
||||
if (blck_useVehiclePatrols && ((_noPatrols > 0) || !(_submarinePatrolParameters isEqualTo []))) then
|
||||
{
|
||||
//params["_coords","_noVehiclePatrols","_skillAI","_missionPatrolVehicles",["_useRelativePos",true],["_uniforms",[]], ["_headGear",[]],["_vests",[]],["_backpacks",[]],["_weaponList",[]],["_sideArms",[]], ["_isScubaGroup",false],["_crewCount",4]];
|
||||
_temp = [_coords,_noVehiclePatrols,_difficulty,_submarinePatrolParameters,_userelativepos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,_isScubaMission,_vehicleCrewCount] call blck_fnc_spawnMissionVehiclePatrols;
|
||||
_temp = [_coords,_noPatrols,_difficulty,_submarinePatrolParameters,_userelativepos,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,_isScubaMission,_vehicleCrewCount] call blck_fnc_spawnMissionVehiclePatrols;
|
||||
// TODO: add grpNull checks to missionVehicleSpawner
|
||||
if (_temp isEqualTo grpNull) throw 1;
|
||||
_missionAIVehicles append (_temp select 0);
|
||||
_blck_AllMissionAI append (_temp select 1);
|
||||
};
|
||||
|
||||
uiSleep delayTime;
|
||||
|
||||
if (blck_debugLevel >= 3) then {diag_log format["monitorInitializedMissions: _spawnCrateTiming = %1 _loadCratesTiming = %2 | _markerMissionName = %3",_spawnCratesTiming,_loadCratesTiming, _markerMissionName]};
|
||||
if (blck_debugLevel >= 3) then {diag_log format["monitorInitializedMissions: _missionLootBoxes = %1",_missionLootBoxes]};
|
||||
if (_spawnCratesTiming in ["atMissionSpawnGround","atMissionSpawnAir"]) then
|
||||
{
|
||||
if (_missionLootBoxes isEqualTo []) then
|
||||
@ -346,20 +353,9 @@ for "_i" from 1 to (count blck_activeMissionsList) do
|
||||
_x setVariable["crateSpawnPos", (getPos _x)];
|
||||
} forEach _crates;
|
||||
private _spawnPara = if (random(1) < _chancePara) then {true} else {false};
|
||||
|
||||
/*
|
||||
private _vars = ["_objects","_hiddenObjects","_crates"];
|
||||
{
|
||||
diag_log format["_monitorInitializedMissions(322): %1 = %2",_vars select _forEachIndex,_x];
|
||||
} forEach [_objects,_hiddenObjects,_crates];
|
||||
*/ // 0 1 2 3 4 5
|
||||
|
||||
_missionData = [_coords,_mines,_objects,_hiddenObjects,_crates,_blck_AllMissionAI,_assetSpawned,_missionAIVehicles,_markers];
|
||||
|
||||
/*
|
||||
{
|
||||
diag_log format["_monitorInitializedMission (327): _missionData %1 = %2",_vars select _foreachIndex,_missionData select _x];
|
||||
} forEach [2,3,4,5];
|
||||
*/
|
||||
_el set[missionData, _missionData];
|
||||
|
||||
// Everything spawned withouth serious errors so lets keep the mission active for future monitoring
|
||||
@ -402,17 +398,7 @@ for "_i" from 1 to (count blck_activeMissionsList) do
|
||||
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
|
||||
|
||||
/*
|
||||
private _vars = ["_objects","_hiddenObjects","_crates"];
|
||||
{
|
||||
diag_log format["_monitorInitializedMissions (363): %1 = %2",_vars select _forEachIndex,_x];
|
||||
} forEach [_objects,_hiddenObjects,_crates];
|
||||
{
|
||||
diag_log format["_monitorInitializedMission (369): _missionData %1 = %2",_vars select _foreachIndex,_missionData select _x];
|
||||
} forEach [2,3,4,5];
|
||||
*/
|
||||
//_el set[missionData, _missionData];
|
||||
|
||||
if (_endIfPlayerNear) then
|
||||
{
|
||||
if (_playerIsNear) throw 1; // mission complete
|
||||
|
Loading…
Reference in New Issue
Block a user