Build 228 Final.

This commit is contained in:
Chris Cardozo 2020-10-05 07:25:11 -04:00
parent e12d256057
commit 60bf05e695
5 changed files with 48 additions and 18 deletions

View File

@ -11,12 +11,12 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
private["_timer1sec","_timer5sec","_timer10Sec","_timer20sec","_timer5min","_timer5min"];
_timer2sec = diag_tickTime;
_timer5sec = diag_tickTime;
_timer10Sec = diag_tickTime;
_timer20sec = diag_tickTime;
_timer1min = diag_tickTime;
_timer5min = diag_tickTime;
_timer2sec = diag_tickTime + 2;
_timer5sec = diag_tickTime + 5;
_timer10Sec = diag_tickTime + 10;
_timer20sec = diag_tickTime + 20;
_timer1min = diag_tickTime + 10;
_timer5min = diag_tickTime + 300;
while {true} do
{
@ -51,10 +51,6 @@ while {true} do
{
[] call blck_fnc_spawnPendingMissions;
_timer10Sec = diag_tickTime;
};
if (diag_tickTime > _timer20sec) then
{
[] call blck_fnc_scanForPlayersNearVehicles;
[] call GMS_fnc_cleanupTemporaryMarkers;
[] call GMS_fnc_updateCrateSignals;
@ -63,7 +59,7 @@ while {true} do
if ((diag_tickTime > _timer1min)) then
{
_timer1min = diag_tickTime + 60;
_timer1min = diag_tickTime + 10;
[] call blck_fnc_restoreHiddenObjects;
[] call blck_fnc_groupWaypointMonitor;
[] call blck_fnc_cleanupAliveAI;

View File

@ -101,9 +101,10 @@ if !(_defaultMissionLocations isEqualTo []) then
if (_isScubaMission) then
{
_coords = [] call blck_fnc_findShoreLocation;
diag_log format["_initializeMission (102): _coords = %1",_coords];
} else {
_coords = [] call blck_fnc_findSafePosn;
diag_log format["_initializeMission (105): _coords = %1",_coords];
};
};
@ -165,10 +166,12 @@ if !(isClass(configFile >> "CfgMarkerColors" >> _markerColor)) then
};
private _markers = [format["%1:%2",_markerName,_missionCount],_markerPos,_markerMissionName,_markerColor,_markerType,_markerSize,_markerBrush] call blck_fnc_createMissionMarkers;
if (blck_debugLevel >= 3) then {[format["_initializeMissions (167): _marker = %1 | _markerMissionName = %2 | _difficulty = %3",_markers,_markerMissionName,_difficulty]] call blck_fnc_log};
/*
Send a message to players.
*/
[["start",_startMsg,_markerMissionName]] call blck_fnc_messageplayers;
private _missionTimeoutAt = diag_tickTime + blck_MissionTimeout;

View File

@ -298,15 +298,35 @@ for "_i" from 1 to (count blck_activeMissionsList) do
uisleep 5;
private _noPatrols = [_noVehiclePatrols] call blck_fnc_getNumberFromRange;
<<<<<<< Updated upstream
//diag_log format["_monitorInitializeMissions(299): __noVehiclePatrols %1 | _noPatrols %2 | _missionPatrolVehicles %3",_noVehiclePatrols,_noPatrols,_missionPatrolVehicles];
=======
//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
];
*/
>>>>>>> Stashed changes
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;
// TODO: add grpNull checks to missionVehicleSpawner
if (_temp isEqualTo grpNull) throw 1;
_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);
};
};
//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;
//diag_log format["_monitorInitializedMissions(320): count _submarinePatrolParameters = %1 | _submarinePatrolParameters = %2",count _submarinePatrolParameters,_submarinePatrolParameters];
if (blck_useVehiclePatrols && ((_submarinePatrols > 0) || !(_submarinePatrolParameters isEqualTo []))) then
@ -315,9 +335,15 @@ for "_i" from 1 to (count blck_activeMissionsList) do
// TODO: add grpNull checks to missionVehicleSpawner
if (_temp isEqualTo grpNull) throw 1;
_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);
};
//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;
if (_spawnCratesTiming in ["atMissionSpawnGround","atMissionSpawnAir"]) then

View File

@ -15,6 +15,14 @@
params["_vehType",["_pos",[]],["_special","NONE"],["_radius",30]];
private _veh = createVehicle[_vehType, _pos, [], _radius, _special];
if (count _pos == 2) then {
_pos pushBack 0;
[format["_fnc_spawnVehicle(20): _pos had only 2 parameters, new value = %1",_pos],'warning'] call blck_fnc_log;
};
if (_pos isEqualTo []) then
{
[format["_fnc_spawnVehicle(20): _pos undefined, now set to [0,0,0]"],'warning'] call blck_fnc_log;
};
_veh setVectorUp surfaceNormal position _veh;
_veh allowDamage true;
_veh enableRopeAttach true;

View File

@ -107,7 +107,7 @@ switch (blck_simulationManager) do
if ( !(blck_debugON) && (blck_debugLevel isEqualTo 0)) then
{
waitUntil{{isPlayer _x}count allPlayers > 0};
["]Player Connected, spawning missions"] call blck_fnc_log;
["Player Connected, spawning missions"] call blck_fnc_log;
} else {
["Debug mode ON, proceding without players"] call blck_fnc_log;
};
@ -163,9 +163,6 @@ private _other = ["NameLocal"] call _fn_setupLocationType;
private _airport = ["Airport"] call _fn_setupLocationType;
blck_townLocations = _villages + _cites + _capitals + _marine + _other + _airport;
{
blck_locationBlackList pushBack [locationPosition _x, blck_minDistanceFromTowns];
} forEach blck_townLocations;
//Start the mission timers
if (blck_enableOrangeMissions > 0) then