Fix for Occupy Boats..

This commit is contained in:
kuplion 2017-05-08 01:50:47 +01:00 committed by GitHub
parent c75a54fb46
commit b1687d1d76
3 changed files with 5 additions and 1 deletions

View File

@ -327,6 +327,7 @@ SC_occupyHeliFixedPositions = [
// Settings for roaming seaborne AI (non armed boats will just sail around)
SC_maxNumberofBoats = 1;
SC_occupySeaVehicleIgnoreCount = false; // true if you want spawn vehicles regardless of overall AI count
// Array of boats which can be used by AI patrols (the number next to next vehicle is the maximum amount of that class allowed, 0 for no limit)
SC_BoatClassToUse = [

View File

@ -21,7 +21,7 @@ if(diag_fps < SC_minFPS) exitWith
};
_aiActive = {alive _x && (side _x == SC_BanditSide OR side _x == SC_SurvivorSide)} count allUnits;
if(_aiActive > _maxAIcount) exitWith
if((_aiActive > _maxAIcount) && !SC_occupySeaVehicleIgnoreCount) exitWith
{
_logDetail = format ["[OCCUPATION:Sea]:: %1 active AI, so not spawning AI this time",_aiActive];
[_logDetail] call SC_fnc_log;
@ -135,6 +135,9 @@ for "_i" from 1 to _vehiclesToSpawn do
_vehicle setVariable ["ExileIsLocked", 0, true];
_vehicle setVariable ["ExileIsPersistent", false];
_vehicle action ["LightOn", _vehicle];
// Limit boat speed to help stop beaching
_vehicle setSpeedMode "LIMITED";
_vehicle limitSpeed 60;
sleep 0.2;
_group addVehicle _vehicle;