Fix for missing mission markers when multiple missions of a type are desired.

This commit is contained in:
Chris Cardozo 2020-09-29 23:29:35 -04:00
parent 70e0a34d28
commit fef589f94c
3 changed files with 6 additions and 5 deletions

View File

@ -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.

View File

@ -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

View File

@ -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 = [];