Bug Fixes

Fixed various errors related to spawning multiple instances of a
mission. fixed the error with undefined variables for the setting for
spanwing map addons.
This commit is contained in:
Ghostrider-DbD- 2017-01-03 09:24:27 -05:00
parent 1024b0d664
commit d04c997010
11 changed files with 68 additions and 70 deletions

Binary file not shown.

View File

@ -5,10 +5,12 @@
- whether it is time to delete the mission objects at a specific location
- whether it is time to delete live AI associated with a specific mission
By Ghostrider-DbD-
Last modified 11-16-16
Last modified 1-2-17
*/
private _index = 0;
_timeAccelUpdated = diag_tickTime;
private ["_index","_timer10Min","_timer1min","_timer5min","_modType"];
_index = 0;
//_timeAccelUpdated = diag_tickTime;
_timer1min = diag_tickTime;
_timer5min = diag_tickTime;
_timer10Min = diag_tickTime;
@ -18,7 +20,6 @@ while {true} do
uiSleep blck_mainThreadUpdateInterval;
if ((diag_tickTime - _timer1min) > 60) then
{
{
if (diag_tickTime > (_x select 1) ) then {
//diag_log format["_fnc_mainTread:: cleaning up AI group %1",_x];
@ -36,11 +37,37 @@ while {true} do
[] call GMS_fnc_cleanupDeadAI;
//if (_modType isEqualTo "Epoch") then {
diag_log "calling blck_fnc_cleanEmptyGroups";
if (_modType isEqualTo "Epoch") then {
//diag_log "calling blck_fnc_cleanEmptyGroups";
[] spawn blck_fnc_cleanEmptyGroups;
//}; // Exile cleans up empty groups automatically so this should not be needed with that mod.
}; // Exile cleans up empty groups automatically so this should not be needed with that mod.
{
diag_log format["_fnc_mainThread:: -- >> _x = %1 and _x select 6 = %2",_x, _x select 6];
if (_x select 6 > 0) then // The mission is not running, check the time left till it is spawned
{
if (diag_tickTime > (_x select 6)) then // time to spawn the mission
{
private _coords = [] call blck_fnc_FindSafePosn;
_coords pushback 0;
blck_ActiveMissionCoords pushback _coords; // Note, old entries are delete in blck_fnc_FindSafePosn
private["_markerClass","_missionName","_missionPath","_aiDifficultyLevel"];
//diag_log format["_fnc_mainThread:: -->> _missionClass would = %1%2",_x select 2, _index];
_markerClass = _x select 2;
diag_log format["_fnc_mainThread:: -->> _markerClass = %1",_markerClass];
_aiDifficultyLevel = _x select 4;
_missionName = selectRandom (_x select 0);
_missionPath = _x select 1;
// example:
// [_missionListHunters,_pathHunters,"HunterMarker","green",blck_TMin_Hunter,blck_TMax_Hunter]
[_coords,_markerClass,_aiDifficultyLevel] execVM format["\q\addons\custom_server\Missions\%1\%2.sqf",_missionPath,_missionName];
};
};
}forEach blck_pendingMissions;
_timer1min = diag_tickTime;
};
if ((diag_tickTime - _timer5min) > 300) then {
@ -60,26 +87,7 @@ while {true} do
};
*/
{
if (_x select 6 > 0) then // The mission is not running, check the time left till it is spawned
{
if (diag_tickTime > (_x select 6)) then // time to spawn the mission
{
private _coords = [] call blck_fnc_FindSafePosn;
_coords pushback 0;
blck_ActiveMissionCoords pushback _coords;
private["_markerClass","_missionName","_missionPath","_aiDifficultyLevel"];
diag_log format["_fnc_mainThread:: -->> _missionClass would = %1%2",_x select 2, _index];
_markerClass = _x select 2;
[_markerClass,"Active",_coords] call blck_fnc_updateMissionQue;
_aiDifficultyLevel = _x select 4;
_missionName = selectRandom (_x select 0);
_missionPath = _x select 1;
// [_missionListHunbers,_pathHunters,"HunterMarker","green",blck_TMin_Hunter,blck_TMax_Hunter]
[_coords,_markerClass,_aiDifficultyLevel] execVM format["\q\addons\custom_server\Missions\%1\%2.sqf",_missionPath,_missionName];
};
};
}forEach blck_pendingMissions;
};

View File

@ -24,7 +24,7 @@ if (blck_debugLevel isEqualTo 3) then
diag_log format["spawnGroup.sqf: _numbertospawn = %1",_numbertospawn];
};
//Creates a group to make them attack players
_groupSpawned = createGroup blck_AI_Side; // ; Group changed for Exile for which player is RESISTANCE.
_groupSpawned = createGroup blck_AI_Side;
if !(isNull _groupSpawned) then
{
diag_log format["_fnc_spawnGroup:: -- >> Group created = %1",_groupSpawned];

View File

@ -5,17 +5,18 @@
Last modified 10-14-16
*/
private _mission = _this;
diag_log format["_fnc_addMissionToQue:: -- >> _mission - %1",_mission];
//private _mission = _this;
//diag_log format["_fnc_addMissionToQue:: -- >> _mission - %1",_mission];
// 0 1 2 3 4 5
// [_missionListOrange,_pathOrange,"OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange,]
params["_missionList","_path","_marker","_difficulty","_tMin","_tMax","_noMissions"];
params["_missionList","_path","_marker","_difficulty","_tMin","_tMax",["_noMissions",1]];
for "_i" from 1 to _noMissions do
{
private _waitTime = diag_tickTime + (_tMin) + random((_tMax) - (_tMin));
_mission = [_missionList,_path,format["%1%2",_marker,_i],_difficulty,_tMin,_tMax,_waitTime,[0,0,0]];
//diag_log format["-fnc_addMissionToQue::-->> _mission = %1",_mission];
// 0 1 2 3 4 5 6 7
private _mission = [_missionList,_path,format["%1%2",_marker,_i],_difficulty,_tMin,_tMax,_waitTime,[0,0,0]];
diag_log format["-fnc_addMissionToQue::-->> _mission = %1",_mission];
blck_pendingMissions pushback _mission;
};
diag_log format["_fnc_addMissionToQue:: -- >> Result - blck_pendingMissions = %1",blck_pendingMissions];

View File

@ -57,9 +57,9 @@ else
//diag_log "missionSpawner:: Mission specific values used for _reinforcementLootCounts";
};
if (blck_debugON) exitWith {
if (blck_debugON) then {
diag_log format["[blckEagle] Mission Reinforcement Parameters: changeReinforcements %1 numAI %2 changePatrol %3 chanceLoot %4",_chanceReinforcements,_noPara,_chanceHeliPatrol,_chanceLoot];
[_blck_localMissionMarker select 0,"Completed"] call blck_fnc_updateMissionQue;
//[_blck_localMissionMarker select 0,"Completed"] call blck_fnc_updateMissionQue;
};
private["_useMines","_abortMissionSpawner","_blck_AllMissionAI","_delayTime","_groupPatrolRadius"];
@ -77,6 +77,9 @@ _delayTime = 1;
_groupPatrolRadius = 50;
_abortMissionSpawner = false;
// [_markerClass,"Active",_coords] call blck_fnc_updateMissionQue;
[_blck_localMissionMarker select 0,"Active",_coords] call blck_fnc_updateMissionQue;
if ((_noEmplacedWeapons + _noAIGroups + _noVehiclePatrols + ([] call blck_fnc_groupsOnAISide)) > 140) then {
// There are insufficient groups available within the 144 group per side maximum to spawn the entire mission
// Log the Error Condition

View File

@ -43,7 +43,7 @@ if (blck_useKilledAIName) then
_message = format["[blck] %1 killed with %2 from %3 meters",name _killer,getText(configFile >> "CfgWeapons" >> _weapon >> "DisplayName"), round(_unit distance _killer)];
};
_message =_message + _killstreakMsg;
diag_log format["[blck] unit killed message is %1",_message,""];
//diag_log format["[blck] unit killed message is %1",_message,""];
[["aikilled",_message,"victory"]] call blck_fnc_messageplayers;
[_unit,_killer,_kills] call blck_fnc_rewardKiller;
{

View File

@ -89,6 +89,7 @@ Last modified 8/1/15
blck_killEmptyAIVehicles = true; // when true, the AI vehicle will be extensively damaged once all AI have gotten out.
blck_AIPatrolVehicles = ["B_G_Offroad_01_armed_EPOCH","B_LSV_01_armed_F"]; // Type of vehicle spawned to defend AI bases
// Updated for v6.51
//Set to -1 to disable. Values of 2 or more force the mission spawner to spawn copies of that mission.
blck_enableOrangeMissions = 1;
blck_enableGreenMissions = 1;
@ -130,9 +131,6 @@ Last modified 8/1/15
blck_MissionTimout = 40*60; // 40 min
// Define the maximum number of crash sites on the map at any one time
blck_maxCrashSites = 3; // recommended settings: 3 for Altis, 2 for Tanoa, 1 for smaller maps. Set to -1 to disable
blck_maxDynamicUnderwaterMissions = 3;
/****************************************************************
GENERAL AI SETTINGS
@ -141,7 +139,7 @@ Last modified 8/1/15
blck_combatMode = "RED"; // Change this to "YELLOW" if the AI wander too far from missions for your tastes.
blck_groupFormation = "WEDGE"; // Possibilities include "WEDGE","VEE","FILE","DIAMOND"
blck_AI_Side = INDEPENDENT;
blck_AI_Side = RESISTANCE;
blck_chanceBackpack = 0.3; // Chance AI will be spawned with a backpack
blck_useNVG = true; // When true, AI will be spawned with NVG if is dark

View File

@ -11,15 +11,10 @@ switch (toLower (worldName)) do
{
case"tanoa": {blck_maxCrashSites = 2};
case"namalsk": {
blck_enableOrangeMissions = 1;
blck_enableOrangeMissions = -1;
blck_enableGreenMissions = -1;
blck_enableRedMissions = 1;
blck_enableBlueMissions = -1;
blck_enableHunterMissions = 1;
blck_enableScoutsMissions = -1;
// Define the maximum number of crash sites on the map at any one time
blck_maxCrashSites = -1; // recommended settings: 3 for Altis, 2 for Tanoa, 1 for smaller maps. Set to -1 to disable
blck_enableRedMissions = -1;
blck_enableBlueMissions = 1;
}
};
@ -34,11 +29,7 @@ if (blck_debugON) then
blck_enableGreenMissions = 1;
blck_enableRedMissions = 1;
blck_enableBlueMissions = 1;
blck_enableHunterMissions = 1;
blck_enableScoutsMissions = 1;
blck_maxCrashSites = 3;
blck_enabeUnderwaterMissions = -1;
blck_cleanupCompositionTimer = 10; // Time after mission completion at which items in the composition are deleted.
blck_AliveAICleanUpTime = 10; // Time after mission completion at which any remaining live AI are deleted.
@ -60,18 +51,14 @@ if (blck_debugON) then
blck_TMin_Red = 20;
blck_TMin_Green = 23;
blck_TMin_Orange = 20;
blck_TMin_Hunter = 15;
blck_TMin_Scouts = 20;
blck_TMin_Crashes = 5;
//Maximum Spawn time between missions in seconds
blck_TMax_Blue = 12;
blck_TMax_Red = 35;
blck_TMax_Green = 38;
blck_TMax_Orange = 31;
blck_TMax_Hunter = 40;
blck_TMax_Scouts = 45;
blck_TMax_Crashes = 15;
//blck_MissionTimout = 120; // 40 min
blck_SkillsBlue = [

View File

@ -12,15 +12,6 @@ _blck_loadingStartTime = diag_tickTime;
#include "\q\addons\custom_server\init\build.sqf";
diag_log format["[blckeagls] Loading version %1 Build %2",_blck_versionDate,_blck_version];
// spawn map addons to give the server time to position them before spawning in crates etc.
if (blck_spawnMapAddons) then
{
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\MapAddons\MapAddons_init.sqf";
}else{
diag_log "[blckegls] Map Addons disabled";
};
blck_spawnMapAddons = nil;
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_variables.sqf";
waitUntil {(isNil "blck_variablesLoaded") isEqualTo false;};
waitUntil{blck_variablesLoaded};
@ -57,6 +48,15 @@ if (_modType isEqualTo "Exile") then
if (blck_blacklistTraderCities || blck_blacklistSpawns || blcklistConcreteMixerZones) then {execVM "\q\addons\custom_server\Compiles\Functions\getTraderCitesExile.sqf";};
};
// spawn map addons to give the server time to position them before spawning in crates etc.
if (blck_spawnMapAddons) then
{
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\MapAddons\MapAddons_init.sqf";
}else{
diag_log "[blckegls] Map Addons disabled";
};
blck_spawnMapAddons = nil;
diag_log "[blckeagls] Loading Map-specific information";
execVM "\q\addons\custom_server\Compiles\Functions\GMS_fnc_findWorld.sqf";
waitUntil {(isNil "blck_worldSet") isEqualTo false;};

View File

@ -1,3 +1,3 @@
private ["_version","_versionDate"];
_blck_version = "6.50 Build 21";
_blck_versionDate = "12-22-16 8:00 PM";
_blck_version = "6.51 Build 22";
_blck_versionDate = "1-2-17 1:00 PM";

View File

@ -198,3 +198,4 @@ if (hasInterface) then
};
};