Fixed a tiny bug and cleaned up code

This commit is contained in:
Ghostrider [GRG] 2023-11-04 00:46:53 -04:00
parent 723c40b188
commit 7109cd74fb
3 changed files with 9 additions and 6 deletions

View File

@ -232,8 +232,8 @@ try {
_markers // index 9 _markers // index 9
]; ];
#define spawnPara -1 #define spawnPara true
GMS_initializedMissionsList pushBack [_key, missionTimeoutAt, triggered, _missionData, _missionConfigs, spawnPara,_isStatic]; GMS_initializedMissionsList pushBack [_key, missionTimeoutAt, triggered, _missionData, _missionConfigs, spawnPara,_isStatic,_missionFile];
// Repair any damage done by prior activities. // Repair any damage done by prior activities.
{_x setDamage 0} forEach ( nearestObjects [_coords, ["Building"], 500]); {_x setDamage 0} forEach ( nearestObjects [_coords, ["Building"], 500]);

View File

@ -114,13 +114,16 @@ for "_i" from 1 to (count _missionsList) do
if (_endIfPlayerNear && {_playerIsNear}) then {throw 1}; // mission complete if (_endIfPlayerNear && {_playerIsNear}) then {throw 1}; // mission complete
if (_endIfAIKilled && {_aiKilled}) then {throw 1}; if (_endIfAIKilled && {_aiKilled}) then {throw 1};
if (_spawnPara isEqualType 0) then if (_spawnPara) then
{ {
#define chancePara 0; #define chancePara 0;
private _chancePara = _paraConfigs select chancePara; private _chancePara = _paraConfigs select chancePara;
_spawnPara = if (random(1) < _chancePara ) then {true} else {false}; _spawnPara = if (random(1) < _chancePara ) then {true} else {false};
if !(_spawnPara) then {
_el set[spawnPara, _spawnPara]; _el set[spawnPara, _spawnPara];
}; };
};
if (_spawnPara) then if (_spawnPara) then
{ {
#define paraTriggerDistance 1 #define paraTriggerDistance 1

View File

@ -237,7 +237,7 @@ if (GMS_useStatic && !(_missionEmplacedWeapons isEqualTo [])) then
uisleep delayTime; uisleep delayTime;
}; };
}; };
diag_log format["_spawnMissionAssets(241): _missionLootVehicles = %1",_missionLootVehicles]; //diag_log format["_spawnMissionAssets(241): _missionLootVehicles = %1",_missionLootVehicles];
if !(_missionLootVehicles isEqualTo []) then if !(_missionLootVehicles isEqualTo []) then
{ {
_lootVehicles = [_coords,_missionLootVehicles,_spawnCratesTiming,_missionFile] call GMS_fnc_spawnMissionLootVehicles; _lootVehicles = [_coords,_missionLootVehicles,_spawnCratesTiming,_missionFile] call GMS_fnc_spawnMissionLootVehicles;
@ -260,7 +260,7 @@ if !(_missionLootVehicles isEqualTo []) then
["_crewCount",4] ["_crewCount",4]
]; ];
*/ */
diag_log format["_spawnMissionAssets (264): __missionPatrolVehicles = %1",_missionPatrolVehicles]; //diag_log format["_spawnMissionAssets (264): __missionPatrolVehicles = %1",_missionPatrolVehicles];
if (GMS_useVehiclePatrols && {!(_missionPatrolVehicles isEqualTo [])}) then if (GMS_useVehiclePatrols && {!(_missionPatrolVehicles isEqualTo [])}) then
{ {
_temp = [_coords,_difficulty,_missionPatrolVehicles,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false,_vehicleCrewCount] call GMS_fnc_spawnMissionVehiclePatrols; _temp = [_coords,_difficulty,_missionPatrolVehicles,_uniforms,_headGear,_vests,_backpacks,_weaponList,_sideArms,false,_vehicleCrewCount] call GMS_fnc_spawnMissionVehiclePatrols;