Merge branch 'Development' into Experimental

This commit is contained in:
Chris Cardozo 2020-10-10 08:34:43 -04:00
commit 644925cbb8
7 changed files with 26 additions and 73 deletions

View File

@ -16,12 +16,7 @@
_fn_missionCleanup = { _fn_missionCleanup = {
params["_coords","_mines","_objects","_hiddenObjects","_blck_AllMissionAI","_markerName","_cleanupAliveAITimer","_cleanupCompositionTimer",["_isScubaMission",false]]; params["_coords","_mines","_objects","_hiddenObjects","_blck_AllMissionAI","_markerName","_cleanupAliveAITimer","_cleanupCompositionTimer",["_isScubaMission",false]];
/*
private _vars = ["_coords","_mines","_objects","_hiddenObjects","_blck_AllMissionAI","_markerName","_cleanupAliveAITimer","_cleanupCompositionTimer"];
{
diag_log format["_endMission:_missionCleanup: %1 = %2",_x,_this select _forEachIndex];
} forEach _vars;
*/
[_mines] call blck_fnc_clearMines; [_mines] call blck_fnc_clearMines;
blck_oldMissionObjects pushback [_coords,_objects, (diag_tickTime + _cleanupCompositionTimer)]; blck_oldMissionObjects pushback [_coords,_objects, (diag_tickTime + _cleanupCompositionTimer)];
blck_hiddenTerrainObjects pushBack[_hiddenObjects,(diag_tickTime + _cleanupCompositionTimer)]; blck_hiddenTerrainObjects pushBack[_hiddenObjects,(diag_tickTime + _cleanupCompositionTimer)];
@ -62,22 +57,6 @@ params[
["_isScubaMission",false] ["_isScubaMission",false]
]; ];
/*
{
diag_log format["_endMission: %1 = %2",_x, _this select _forEachIndex];
} forEach [ "_coords",
"_mines",
"_objects",
"_hiddenObjects",
"_crates",
"_blck_AllMissionAI",
"_endMsg",
"_markers",
"_markerPos",
"_markerName",
"_markerLabel"
];
*/
{ {
[_x] call blck_fnc_deleteMarker; [_x] call blck_fnc_deleteMarker;
}forEach (_markers); }forEach (_markers);

View File

@ -284,7 +284,6 @@ for "_i" from 1 to (count blck_activeMissionsList) do
private _userelativepos = true; private _userelativepos = true;
private _emplacedWeaponsThisMission = [_noEmplacedWeapons] call blck_fnc_getNumberFromRange; 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 if (blck_useStatic && ((_emplacedWeaponsThisMission > 0) || !(_missionEmplacedWeapons isEqualTo []))) then
// TODO: add error checks for grpNull to the emplaced weapon spawner // TODO: add error checks for grpNull to the emplaced weapon spawner
{ {
@ -299,48 +298,25 @@ for "_i" from 1 to (count blck_activeMissionsList) do
uisleep 5; uisleep 5;
private _noPatrols = [_noVehiclePatrols] call blck_fnc_getNumberFromRange; private _noPatrols = [_noVehiclePatrols] call blck_fnc_getNumberFromRange;
//diag_log format["_monitorInitializedMissions(299): _markerMissionName = %2 | count _missionAIVehicles = %1",count _missionAIVehicles,_markerMissionName];
/*
diag_log format[
"_monitorInitializeMissions(300): __noVehiclePatrols %1 | _noPatrols %2 | count _missionPatrolVehicles %3 | _missionPatrolVehicles = %4",
_noVehiclePatrols,
_noPatrols,
count _missionPatrolVehicles,
_missionPatrolVehicles
];
*/
if (blck_useVehiclePatrols && ((_noPatrols > 0) || !(_missionPatrolVehicles isEqualTo []))) then if (blck_useVehiclePatrols && ((_noPatrols > 0) || !(_missionPatrolVehicles isEqualTo []))) then
{ {
_temp = [_coords,_noPatrols,_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 // TODO: add grpNull checks to missionVehicleSpawner
if (_temp isEqualTo grpNull) throw 1; if (_temp isEqualTo grpNull) throw 1;
_missionAIVehicles append (_temp select 0); _missionAIVehicles append (_temp select 0);
//diag_log format ["_monitorInitializedMissions(306): count (_temp select 0)/no mission vehicles spawned = %1",count (_temp select 0)];
_blck_AllMissionAI append (_temp select 1); _blck_AllMissionAI append (_temp select 1);
}; };
//diag_log format["_monitorInitializedMissions(310): _count _missionAIVehicles = %1",count _missionAIVehicles];
/*
{
diag_log format["_monitorInitializedMissions(318): spawned vehicle %1 of type %2 object %2",_forEachIndex,typeOf _x, _x];
} forEach _missionAIVehicles;
*/
uiSleep delayTime; uiSleep delayTime;
//diag_log format["_monitorInitializedMissions(320): count _submarinePatrolParameters = %1 | _submarinePatrolParameters = %2",count _submarinePatrolParameters,_submarinePatrolParameters];
if (blck_useVehiclePatrols && ((_submarinePatrols > 0) || !(_submarinePatrolParameters isEqualTo []))) then if (blck_useVehiclePatrols && ((_submarinePatrols > 0) || !(_submarinePatrolParameters isEqualTo []))) then
{ {
_temp = [_coords,_noPatrols,_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 // TODO: add grpNull checks to missionVehicleSpawner
if (_temp isEqualTo grpNull) throw 1; if (_temp isEqualTo grpNull) throw 1;
_missionAIVehicles append (_temp select 0); _missionAIVehicles append (_temp select 0);
//diag_log format ["_monitorInitializedMissions(327): count (_temp select 0)/no mission vehicles spawned = %1",count (_temp select 0)];
_blck_AllMissionAI append (_temp select 1); _blck_AllMissionAI append (_temp select 1);
}; };
//diag_log format["_monitorInitializedMissions(330): count _missionAIVehicles = %1",count _missionAIVehicles];
/*
{
diag_log format["_monitorInitializedMissions(332): spawned vehicle %1 of type %2 object %2",_forEachIndex,typeOf _x, _x];
} forEach _missionAIVehicles;
*/
uiSleep delayTime; uiSleep delayTime;
if (_spawnCratesTiming in ["atMissionSpawnGround","atMissionSpawnAir"]) then if (_spawnCratesTiming in ["atMissionSpawnGround","atMissionSpawnAir"]) then
@ -353,7 +329,7 @@ for "_i" from 1 to (count blck_activeMissionsList) do
{ {
_crates = [_coords,_missionLootBoxes,_loadCratesTiming, _spawnCratesTiming, "start", _difficulty] call blck_fnc_spawnMissionCrates; _crates = [_coords,_missionLootBoxes,_loadCratesTiming, _spawnCratesTiming, "start", _difficulty] call blck_fnc_spawnMissionCrates;
}; };
//diag_log format["_monitorInitializeMissions (318): crates spawned = %1",_crates];
if (blck_cleanUpLootChests) then if (blck_cleanUpLootChests) then
{ {
_objects append _crates; _objects append _crates;

View File

@ -40,7 +40,6 @@ private _hiddenObjs = [];
}; };
_obj = createVehicle[_className,[0,0,0],[],0,"CAN_COLLIDE"]; _obj = createVehicle[_className,[0,0,0],[],0,"CAN_COLLIDE"];
_obj setPosATL _objPos; _obj setPosATL _objPos;
//diag_log format["_spawnCompositionObjects: _obj = %1 | netID _obj = %2",_obj,netID _obj];
_newObjs pushback (netID _obj); _newObjs pushback (netID _obj);
[_obj, _dir] call blck_fnc_setDirUp; [_obj, _dir] call blck_fnc_setDirUp;
_obj setVectorUp [0,0,1]; _obj setVectorUp [0,0,1];

View File

@ -41,10 +41,6 @@ params[
["_sideArms",[]] ["_sideArms",[]]
]; ];
{
diag_log format["_fnc_spawnGarrisonInsideBuilding_relPos: _this %1 = %2",_forEachIndex,_x];
} forEach _this;
if (_weaponList isEqualTo []) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout}; if (_weaponList isEqualTo []) then {_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout};
if (_sideArms isEqualTo []) then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms}; if (_sideArms isEqualTo []) then {_sideArms = [_aiDifficultyLevel] call blck_fnc_selectAISidearms};
if (_uniforms isEqualTo []) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms}; if (_uniforms isEqualTo []) then {_uniforms = [_aiDifficultyLevel] call blck_fnc_selectAIUniforms};
@ -65,7 +61,7 @@ for "_i" from 1 to _statics do
{ {
if (_allBldPsn isEqualTo []) exitWith {}; if (_allBldPsn isEqualTo []) exitWith {};
_pos = _allBldPsn deleteAt 0; _pos = _allBldPsn deleteAt 0;
//diag_log format["_fnc_spawnGarrisonInsideBuilding_relPos: _pos = %1",_pos]; diag_log format["_fnc_spawnGarrisonInsideBuilding_relPos: _pos = %1",_pos];
_locsUsed pushBack _pos; _locsUsed pushBack _pos;
_staticClassName = selectRandom _typesStatics; _staticClassName = selectRandom _typesStatics;
_obj = [_staticClassName, [0,0,0]] call blck_fnc_spawnVehicle; _obj = [_staticClassName, [0,0,0]] call blck_fnc_spawnVehicle;

View File

@ -1,4 +1,4 @@
#define blck_buildNumber 229 // Address issues with cleanup of objects #define blck_buildNumber 230 // Address issues with cleanup of objects
#define blck_versionNumber 7.02 #define blck_versionNumber 7.02
#define blck_buildDate "10-5-20" #define blck_buildDate "10-5-20"

View File

@ -9,17 +9,24 @@ Many thanks for new Coding and ideas from Grahame.
Significant Changes: Significant Changes:
===================== =====================
7.00 Build 218 7.02 Build 230
New: Option to hide bushes and trees that happen to be under the location in which an enterable building is spawned
blck_hideRocksAndPlants = true; // When true, any rocks, trees or bushes under enterable buildings will be 'hidden'
New: Added support for simple objects. Note that these can be exported by the editor tool now.
New: Option to drop crates on a parachute at mission spawn which adds some randomness to where crates end up. New: Option to drop crates on a parachute at mission spawn which adds some randomness to where crates end up.
blck_spawnCratesTiming = "atMissionSpawnAir"; blck_spawnCratesTiming = "atMissionSpawnAir";
New: You can now add money to crates at static missions by defining the following parameter in your .sqf for the mission. New: You can now add money to crates at static missions by defining the following parameter in your .sqf for the mission.
_crateMoney = 10000; _crateMoney = 10000;
// this can be a value or a range such as [1000,10000]; this can be a value or a range such as [1000,10000];
a random amount of money from 0 to the maximum defined will be added. a random amount of money from 0 to the maximum defined will be added.
New: Added checks and logging for invalid marker types and colors; default values are now provided.
New: Added some basic error checking and logging for incorrect entries for some key settings. New: Added some basic error checking and logging for incorrect entries for some key settings.
New: 3DEN Editor plugin exports missions as .sqf formated text ready to paste into a file. New: 3DEN Editor plugin exports missions as .sqf formated text ready to paste into a file.
@ -27,16 +34,20 @@ New: 3DEN Editor plugin exports missions as .sqf formated text ready to paste in
Fixed: Don and Hostage missions could not be completed Fixed: Don and Hostage missions could not be completed
Fixed: Missions tended to spawn all at once Fixed: Missions tended to spawn all at once
Fixed: vehicles are spawned at a safe spot which should reduce unintended explosions Fixed: Vehicles sometimes blew up on spawn. vehicles are spawned at a safe spot which should reduce unintended explosions
Fixed: Missions sometimes spawned on steep hillsides. Fixed: Missions sometimes spawned on steep hillsides.
Fixed: Vehicles sometimes blew up on spawn. Fixed: Missions were not distributed over the entire map. The scripts now pick a random quadrant to search thus ensuring broader distribution of mission locations.
Fixed: Money was not added to crates at dynamic missions Fixed: Money was not added to crates at dynamic missions
Fixed: Markers were not shown if more than once instance of a mission was spawned.
Fixed: No subs or scuba units were spawned at dynamic UMS missions.
Fixed: Jets crashed at spawn in.
Changed: Timers for spawning missions adjusted a bit to space out spawn/timeouts a bit more. Changed: Timers for spawning missions adjusted a bit to space out spawn/timeouts a bit more.
Changed: The system has been upgreaded to a state-based system, meaning only one script (GMS_fnc_mainThread)is running once all missions are initialized. Changed: The system has been upgraded to a state-based system, meaning only one script (GMS_fnc_mainThread)is running once all missions are initialized.
Changed: a lot of debugging was removed. Changed: a lot of debugging code was removed.
Changed: List of missions for dynamic Underwater missions was moved to \Missions\GMS_missionLIsts.sqf Changed: List of missions for dynamic Underwater missions was moved to \Missions\GMS_missionLIsts.sqf
Changed: Units spawned where the surface is water are spawned with UMS gear now.
Changed: Added some CBA compatability (Thanks to porkeid for the fixes)
6.98 Build 206 6.98 Build 206
FIXED: few minor bug fixes. FIXED: few minor bug fixes.
@ -59,12 +70,6 @@ Removed: some debugging and map sepcific settings from blck_custom_config.sqf
Changed: some code for finding locations for a new mission. Changed: some code for finding locations for a new mission.
Added: all blckeagls map markers have the same prefix: "blckeagls_marker" Added: all blckeagls map markers have the same prefix: "blckeagls_marker"
6.96 Build 199 6.96 Build 199
Added support for Arma servers not running Epoch or Exile Added support for Arma servers not running Epoch or Exile
@ -117,8 +122,6 @@ Added offloading of AI to clients
// TODO: set to false before release // TODO: set to false before release
blck_limit_ai_offload_to_blckeagls = true; // when true, only groups spawned by blckeagls are evaluated. blck_limit_ai_offload_to_blckeagls = true; // when true, only groups spawned by blckeagls are evaluated.
Fixed - Vehicle unlock when empty of crew through adding a getOut event handler. Fixed - Vehicle unlock when empty of crew through adding a getOut event handler.
Code for spawning vehicles redone to reduced redundancy. Code for spawning vehicles redone to reduced redundancy.
Monitoring of groups refined to route mission groups that have left the mission area back to it. Monitoring of groups refined to route mission groups that have left the mission area back to it.
@ -241,7 +244,7 @@ Added: A new mission completion condition for hostage and captive missions.
Added: Mission crates can now be spawned on the ground or in the air at mission completion. Added: Mission crates can now be spawned on the ground or in the air at mission completion.
blck_spawnCratesTiming sets the default for all missions. blck_spawnCratesTiming sets the default for all missions.
blck_spawnCratesTiming = "atMissionEndAir"; // Choices: "atMissionSpawnGround","atMissionStartAir","atMissionEndGround","atMissionEndAir". blck_spawnCratesTiming = "atMissionEndAir"; // Choices: "atMissionSpawnGround","atMissionSpawnAir","atMissionEndGround","atMissionEndAir".
Define _spawnCratesTiming to set this parameter for a particular mission. Define _spawnCratesTiming to set this parameter for a particular mission.
_spawnCratesTiming = "atMissionEndAir"; _spawnCratesTiming = "atMissionEndAir";
See the hostage1.sqf mission as an example. See the hostage1.sqf mission as an example.