diff --git a/pre-packaged pbo/a3_exile_occupation.pbo b/pre-packaged pbo/a3_exile_occupation.pbo index 90b3b35..3786e13 100644 Binary files a/pre-packaged pbo/a3_exile_occupation.pbo and b/pre-packaged pbo/a3_exile_occupation.pbo differ diff --git a/source/a3_exile_occupation/config.sqf b/source/a3_exile_occupation/config.sqf index cd1d33f..1683c9f 100644 --- a/source/a3_exile_occupation/config.sqf +++ b/source/a3_exile_occupation/config.sqf @@ -45,8 +45,8 @@ SC_occupyTraders = true; // true if you want to create trader c SC_occupyStatic = false; // true if you want to add AI in specific locations SC_occupyTransport = true; // true if you want pubic transport (travels between traders) SC_occupyLootCrates = true; // true if you want to have random loot crates with guards -SC_occupyRandomSpawn = true; // (WORK IN PROGRESS) true if you want random spawning AI that hunt for nearby players -SC_occupyMilitary = true; // true if you want military buildings patrolled +SC_occupyRandomSpawn = true; // (WORK IN PROGRESS) true if you want random spawning AI that hunt for nearby players +SC_occupyMilitary = true; // true if you want military buildings patrolled SC_occupyVehicle = true; // true if you want to have roaming AI land vehicles SC_occupySky = true; // true if you want to have roaming AI helis SC_occupySea = false; // true if you want to have roaming AI boats @@ -411,13 +411,13 @@ if (worldName == 'Namalsk' AND SC_useMapOverrides) then if (worldName == 'Napf' AND SC_useMapOverrides) then { SC_maxAIcount = 120; - SC_maxNumberofVehicles = 5; + }; if (worldName == 'Chernarus' AND SC_useMapOverrides) then { SC_maxAIcount = 120; - SC_maxNumberofVehicles = 5; + }; if (worldName == 'Tanoa' AND SC_useMapOverrides) then diff --git a/source/a3_exile_occupation/scripts/eventHandlers/vehicleDestroyed.sqf b/source/a3_exile_occupation/scripts/eventHandlers/vehicleDestroyed.sqf index 19c8881..5086c52 100644 --- a/source/a3_exile_occupation/scripts/eventHandlers/vehicleDestroyed.sqf +++ b/source/a3_exile_occupation/scripts/eventHandlers/vehicleDestroyed.sqf @@ -1,8 +1,4 @@ _vehicle = _this select 0; -//_vehicle removeAllMPEventHandlers "mphit"; -//_vehicle removeAllMPEventHandlers "mpkilled"; -//_vehicle removeAllEventHandlers "getin"; -//_vehicle removeAllEventHandlers "getout"; if((damage _vehicle) < 1) then { @@ -11,18 +7,18 @@ if((damage _vehicle) < 1) then if(_vehicle isKindOf "LandVehicle") then { - SC_liveVehicles = SC_liveVehicles - 1; - SC_liveVehiclesArray = SC_liveVehiclesArray - [_vehicle]; + SC_liveVehiclesArray = SC_liveVehiclesArray - [_vehicle]; + SC_liveVehicles = count(SC_liveVehiclesArray); }; if(_vehicle isKindOf "Air") then -{ - SC_liveHelis = SC_liveHelis - 1; - SC_liveHelisArray = SC_liveHelisArray - [_vehicle]; +{ + SC_liveHelisArray = SC_liveHelisArray - [_vehicle]; + SC_liveHelis = count(SC_liveHelisArray); }; if(_vehicle isKindOf "Ship") then -{ - SC_liveBoatss = SC_liveBoatss - 1; - SC_liveBoatsArray = SC_liveBoatsArray - [_vehicle]; +{ + SC_liveBoatsArray = SC_liveBoatsArray - [_vehicle]; + SC_liveBoatss = count(SC_liveBoatsArray); }; diff --git a/source/a3_exile_occupation/scripts/functions/fnc_unstick.sqf b/source/a3_exile_occupation/scripts/functions/fnc_unstick.sqf index 81f7156..bd68940 100644 --- a/source/a3_exile_occupation/scripts/functions/fnc_unstick.sqf +++ b/source/a3_exile_occupation/scripts/functions/fnc_unstick.sqf @@ -37,6 +37,12 @@ if(count(crew _vehicle) > 0)then _originalSpawnLocation = _vehicle getVariable "SC_vehicleSpawnLocation"; _radius = 2000; _group = group _vehicle; + + // Remove dead units from the group + { + if(!alive _x) then { [_x] join grpNull; }; + }forEach units _group; + _vehClass = typeOf _vehicle; if(_vehicle isKindOf "LandVehicle") then @@ -68,7 +74,7 @@ if(count(crew _vehicle) > 0)then _group2 = createGroup _side; _group2 setVariable ["DMS_AllowFreezing",false]; [_group2,false] call DMS_fnc_FreezeToggle; - _group2 setVariable ["DMS_LockLocality",true]; + _group2 setVariable ["DMS_LockLocality",false]; _group2 setVariable ["DMS_SpawnedGroup",true]; _group2 setVariable ["DMS_Group_Side", _side]; [_vehicle] joinSilent _group2; @@ -97,13 +103,6 @@ if(count(crew _vehicle) > 0)then _vehicle setVariable["vehPos",_newPos]; }; -_group = group _vehicle; - -// Remove dead units from the group -{ - if(!alive _x) then { [_x] join grpNull; }; -}forEach units _group; - if(count units _group > 0) then { _vehicle lock 0; diff --git a/source/a3_exile_occupation/scripts/occupationMonitor.sqf b/source/a3_exile_occupation/scripts/occupationMonitor.sqf index d11bfe0..fa4c53d 100644 --- a/source/a3_exile_occupation/scripts/occupationMonitor.sqf +++ b/source/a3_exile_occupation/scripts/occupationMonitor.sqf @@ -1,6 +1,7 @@ _logDetail = format ["[OCCUPATION:Unstick]:: Initialised at %1",time]; [_logDetail] call SC_fnc_log; +SC_liveHelis = count(SC_liveHelisArray); { if(isNull _x) exitWith { SC_liveHelisArray = SC_liveHelisArray - [_x]; }; _logDetail = format ["[OCCUPATION:Unstick]:: Air: %1 is active",_x]; @@ -39,6 +40,7 @@ _logDetail = format ["[OCCUPATION:Unstick]:: Initialised at %1",time]; }forEach SC_liveHelisArray; +SC_liveVehicles = count(SC_liveVehiclesArray); { if(isNull _x) exitWith { SC_liveVehiclesArray = SC_liveVehiclesArray - [_x]; }; _logDetail = format ["[OCCUPATION:Unstick]:: Land: %1 is active",_x]; @@ -60,6 +62,7 @@ _logDetail = format ["[OCCUPATION:Unstick]:: Initialised at %1",time]; sleep 2; }forEach SC_liveVehiclesArray; +SC_liveBoats = count(SC_liveBoatsArray); { if(isNull _x) exitWith { SC_liveBoatsArray = SC_liveBoatsArray - [_x]; }; _logDetail = format ["[OCCUPATION:Unstick]:: Sea: %1 is active",_x];