From fef589f94c5ff42176e12a764ae21c7b0cc21513 Mon Sep 17 00:00:00 2001 From: Chris Cardozo Date: Tue, 29 Sep 2020 23:29:35 -0400 Subject: [PATCH] Fix for missing mission markers when multiple missions of a type are desired. --- .../Compiles/Missions/GMS_fnc_initializeMission.sqf | 5 +++-- .../Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf | 4 ++-- @GMS/addons/custom_server/Compiles/blck_variables.sqf | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_initializeMission.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_initializeMission.sqf index 3b95484..6e42e9f 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_initializeMission.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_initializeMission.sqf @@ -7,7 +7,7 @@ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; private ["_coords","_coordArray","_return"]; -params["_missionCategoryDescriptors","_missionParameters"]; +params["_missionCategoryDescriptors","_missionParameters","_missionCount"]; _missionCategoryDescriptors params [ "_difficulty", "_noMissions", // Max no missions of this category @@ -107,6 +107,7 @@ if !(_defaultMissionLocations isEqualTo []) then if (_coords isEqualTo []) exitWith { + [format["No Safe Mission Spawn Position Found to spawn Mission %1",_markerMissionName],'warning'] call blck_fnc_log; false; }; @@ -161,7 +162,7 @@ if !(isClass(configFile >> "CfgMarkerColors" >> _markerColor)) then _missionParameters set [1,_markerMissionName]; }; -private _markers = [_markerName,_markerPos,_markerMissionName,_markerColor,_markerType,_markerSize,_markerBrush] call blck_fnc_createMissionMarkers; +private _markers = [format["%1:%2",_markerName,_missionCount],_markerPos,_markerMissionName,_markerColor,_markerType,_markerSize,_markerBrush] call blck_fnc_createMissionMarkers; /* Send a message to players. diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf index 77be5fd..7f0802d 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnPendingMissions.sqf @@ -17,10 +17,10 @@ if (blck_missionsRunning >= blck_maxSpawnedMissions) exitWith {}; if (_noActiveMissions < _maxNoMissions && diag_tickTime > _waitTime && blck_missionsRunning < blck_maxSpawnedMissions) then { - + blck_dynamicMissionsSpawned = blck_dynamicMissionsSpawned + 1; // time to reset timers and spawn something. private _wt = diag_tickTime + _tmin + (random(_tMax - _tMin)); - private _missionInitialized = [_x,selectRandom _missionsData] call blck_fnc_initializeMission; + private _missionInitialized = [_x,selectRandom _missionsData,blck_dynamicMissionsSpawned] call blck_fnc_initializeMission; if (blck_debugLevel >= 3) then { if !(_missionInitialized) then diff --git a/@GMS/addons/custom_server/Compiles/blck_variables.sqf b/@GMS/addons/custom_server/Compiles/blck_variables.sqf index 45b631b..e470a8e 100644 --- a/@GMS/addons/custom_server/Compiles/blck_variables.sqf +++ b/@GMS/addons/custom_server/Compiles/blck_variables.sqf @@ -46,7 +46,7 @@ blck_temporaryMarkers = []; blck_illuminatedCrates = []; // [crate,duration,freq of replacement] blck_mainThreadUpdateInterval = 60; blck_revealMode = "detailed"; //""basic" /*group or vehicle level reveals*/,detailed /*unit by unit reveals*/"; - +blck_dynamicMissionsSpawned = 0; blck_spawnerMode = 1; blck_missionData = []; blck_activeMissionsList = [];