Update to Build 236

This commit is contained in:
Chris Cardozo 2020-11-21 14:51:15 -05:00
parent 11b951cfda
commit 924512b299
2 changed files with 527 additions and 471 deletions

View File

@ -26,7 +26,6 @@ for "_i" from 1 to (count blck_activeMissionsList) do
"_missionParameters" // 5 // Variables regarding the configuration of the dynamic mission
];
private _playerInRange = [_missionData select 0, blck_TriggerDistance, false] call blck_fnc_playerInRange;
#define delayTime 1
private _monitorAction = -2;
@ -35,22 +34,30 @@ for "_i" from 1 to (count blck_activeMissionsList) do
if (diag_tickTime > _missionTimeoutAt) then
{
_monitorAction = -1;
//diag_log format["_monitorInitializedMissions (37) Mission Timeout Criteria Met at %1",diag_tickTime];
} else {
private _playerInRange = [_missionData select 0, blck_TriggerDistance, false, true] call blck_fnc_playerInRange;
if (_playerInRange) then {
//diag_log format["_monitorInitializedMissions (41) Player in range criteria met at %1",diag_tickTime];
_monitorAction = 0;
} else {
if (blck_debugLevel >= 3) then {_monitorAction = 0}; // simulate the mission being tripped by a player
};
};
} else {
if (_triggered isEqualTo 1) then
if (_triggered == 1) then
{
//diag_log format["_monitorInitializedMissions (50) Mission already triggered: time %1",diag_tickTime];
_monitorAction = 1;
};
};
if (_monitorAction == -2) exitWith {};
//diag_log format["_monitorInitializedMissions: time %1 | _monitorAction %2 | _missionParameters %3",diag_tickTime,_monitorAction,_missionParameters];
if (_monitorAction == -2) then
{
blck_activeMissionsList pushBack _el;
} else {
_missionCategoryDescriptors params [
"_difficulty",
"_noMissions", // Max no missions of this category
@ -73,27 +80,74 @@ for "_i" from 1 to (count blck_activeMissionsList) do
"_spawnedLootVehicles",
"_markers"
];
switch (_monitorAction) do
{
// Handle Timeout
case -1:
{
_missionParameters params[
"_markerData",
"_missionMessages"
];
_markerData params[
"_markerName",
"_markerMissionName",
"_markerMissionName"
];
_missionMessages params [
"_assetKilledMsg",
"_endMsg"
];
[format["_fnc_monitorInitializedMissions: mission timed out: %1",_el]] call blck_fnc_log;
_missionCategoryDescriptors set[noActive, _noActive - 1];
[_coords,_mines,_objects,_hiddenObjects,_crates, _blck_AllMissionAI,_endMsg,_markers,markerPos (_markers select 1),_markerName,_markerMissionName, -1] call blck_fnc_endMission;
};
// Handle mission waiting to be triggerd and player is within the range to trigger
case 0:
{
_missionParameters params[
"_markerData",
"_missionMessages",
"_paraData",
"_endCondition",
"_isscubamission",
"_missionLoot",
"_aiData"
];
_markerData params[
"_markerName",
"_markerMissionName"
];
_missionMessages params [
"_assetKilledMsg",
"_endMsg",
"_startMsg",
"_defaultMissionLocations",
"_startMsg"
];
_missionLoot params [
"_spawnCratesTiming",
"_loadCratesTiming",
"_crateLoot",
"_lootCounts",
"_markerType",
"_markerColor",
"_markerSize",
"_markerBrush",
"_missionLootBoxes",
"_missionLootVehicles"
];
_aiData params [
"_uniforms",
"_headgear",
"_vests",
"_backpacks",
"_weaponList",
"_sideArms",
"_missionLandscapeMode",
"_garrisonedBuildings_BuildingPosnSystem",
"_garrisonedBuilding_ATLsystem",
"_missionLandscape",
"_simpleObjects",
"_missionLootBoxes",
"_missionLootVehicles",
"_missionPatrolVehicles",
"_submarinePatrols",
"_submarinePatrols", // Added Build 227
"_submarinePatrolParameters",
"_airPatrols",
"_noVehiclePatrols",
@ -105,47 +159,14 @@ for "_i" from 1 to (count blck_activeMissionsList) do
"_maxNoAI",
"_noAIGroups",
"_missionGroups",
"_scubaPatrols",
"_scubaPatrols", // Added Build 227
"_scubaGroupParameters",
"_hostageConfig",
"_enemyLeaderConfig",
"_assetKilledMsg",
"_uniforms",
"_headgear",
"_vests",
"_backpacks",
"_weaponList",
"_sideArms",
"_chanceHeliPatrol",
"_noChoppers",
"_missionHelis",
"_chancePara",
"_noPara",
"_paraTriggerDistance",
"_paraSkill",
"_chanceLoot",
"_paraLoot",
"_paraLootCounts",
"_spawnCratesTiming",
"_loadCratesTiming",
"_endCondition",
"_isScubaMission"
"_missionHelis"
];
switch (_monitorAction) do
{
// Handle Timeout
case -1:
{
//[format["_fnc_monitorInitializedMissions: mission timed out: %1",_el]] call blck_fnc_log;
_missionCategoryDescriptors set[noActive, _noActive - 1];
[_coords,_mines,_objects,_hiddenObjects,_crates, _blck_AllMissionAI,_endMsg,_markers,markerPos (_markers select 1),_markerName,_markerMissionName, -1] call blck_fnc_endMission;
};
// Handle mission waiting to be triggerd and player is within the range to trigger
case 0:
{
#define triggered 2
#define timedOut 1
_el set[triggered,1];
@ -354,7 +375,6 @@ 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};
_missionData = [_coords,_mines,_objects,_hiddenObjects,_crates,_blck_AllMissionAI,_assetSpawned,_missionAIVehicles,_spawnedLootVehicles,_markers];
@ -378,6 +398,31 @@ for "_i" from 1 to (count blck_activeMissionsList) do
case 1:
{
_missionParameters params[
"_markerData",
"_missionMessages",
"_paraData",
"_endCondition",
"_isscubamission",
"_missionLoot",
"_aiData"
];
_markerData params [
"_markerName",
"_markerMissionName"
];
_missionMessages params [
"_assetKilledMsg",
"_endMsg"
];
_missionLoot params [
"_spawnCratesTiming",
"_loadCratesTiming"
];
private _missionComplete = -1;
private ["_secureAsset","_endIfPlayerNear","_endIfAIKilled"];
@ -412,14 +457,28 @@ for "_i" from 1 to (count blck_activeMissionsList) do
if (_aiKilled) throw 1;
};
if (_spawnPara) then
if (_spawnPara || blck_debugLevel >= 3) then
{
if ([_coords,_paraTriggerDistance,true] call blck_fnc_playerInRange) then
if ([_coords,_paraData select 1,true] call blck_fnc_playerInRange) then
{
_spawnPara = false; // The player gets one try to spawn these.
_el set[3,_spawnPara];
if (random(1) < _chancePara) then //
{
_paraData params[
"_noPara",
"_paraTriggerDistance",
"_paraSkill",
"_chanceLoot",
"_paraLoot",
"_paraLootCounts"
];
_aiData params [
"_uniforms",
"_headgear",
"_vests",
"_backpacks",
"_weaponList",
"_sideArms"
];
private _paratroops = [_coords,_noPara,_difficulty,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,_isScubaMission] call blck_fnc_spawnParaUnits;
if !(isNull _paratroops) then
{
@ -433,7 +492,7 @@ for "_i" from 1 to (count blck_activeMissionsList) do
_objects append _extraCrates;
};
};
};
diag_log format["_monitorInitializedMissions: para spawned at %1",diag_tickTime];
};
};
@ -482,7 +541,7 @@ for "_i" from 1 to (count blck_activeMissionsList) do
switch (_exception) do
{
case 1: { // Normal Mission End
//diag_log format["_monitorInitializedMissions: Normal mission end"];
diag_log format["_monitorInitializedMissions: Normal mission end"];
if (_spawnCratesTiming in ["atMissionEndGround","atMissionEndAir"]) then
{
if (!(_secureAsset) || (_secureAsset && (alive _assetSpawned))) then
@ -585,12 +644,9 @@ for "_i" from 1 to (count blck_activeMissionsList) do
};
};
};
default
{
blck_activeMissionsList pushBack _el;
};
};
//diag_log format["_monitorInitializedMissions (599) End of Code Block | blck_activeMissionsList = %1",blck_activeMissionsList];
};
blck_activeMonitorThreads = blck_activeMonitorThreads - 1;

View File

@ -1,4 +1,4 @@
#define blck_buildNumber 235 // Address issues with cleanup of objects
#define blck_versionNumber 7.04
#define blck_buildDate "11-16-20"
#define blck_buildNumber 236 // Address issues with cleanup of objects
#define blck_versionNumber 7.06
#define blck_buildDate "11-21-20"