From 98ea77fd87515123519f23dde24a9218902b6d7f Mon Sep 17 00:00:00 2001 From: second_coming Date: Mon, 15 Aug 2016 15:42:05 +0100 Subject: [PATCH] V60 Fixes --- pre-packaged pbo/a3_exile_occupation.pbo | Bin 214106 -> 214008 bytes source/a3_exile_occupation/config.sqf | 8 +++---- .../eventHandlers/vehicleDestroyed.sqf | 20 +++++++----------- .../scripts/functions/fnc_unstick.sqf | 15 ++++++------- .../scripts/occupationMonitor.sqf | 3 +++ 5 files changed, 22 insertions(+), 24 deletions(-) diff --git a/pre-packaged pbo/a3_exile_occupation.pbo b/pre-packaged pbo/a3_exile_occupation.pbo index 90b3b35dac1b536308bf55fd902f8e6bf1220439..3786e13a1cc7702f3662694c811a8e3e83ac72d3 100644 GIT binary patch delta 599 zcmccB!TY0~cfv-#(_IW;(C}bm`01{V`*$+(_3=Q2vVcN;Jd+ifL^jW2Dq>__@nGX- zewKD-0WBto0`^B6!$Iun2_Z~Mn@_NFG4VbUfJn_bwK4qB=KGxMtta=oHcS@s6P^Ak zf=PI@iCaa+osGhLYjLhVmRD`za7uA_Wm|$w(sW9$mf*IwMpICxW2sHpK2sOVQX#Vy! z>P)|a7bZ`gw4i&+xu0k;Ch AmH+?% delta 569 zcmey-&U>qacfv+K)@}wc5WBe{oV9!7{+*0`ygU%0rqxTrd3h!)GKoyLPi5lTyo4!( zk@@QN4V(E{+L;BeFhNum>#Yt4v8OK&VN%+Bf}M+r_n`npYVEQm;SV?8=Ui_+x!<*Z z@{V|s&B|`w8H}9MAE+>ivvG3TDwtYNUbij=LqvSD;`;mf+co7G`&g#~Nww`fs*L-Y zz|3|j4aV(K8cbKFGU@A27u?6B1EtjxvNLmXQd5+yx%Bnp%ThBklXFrPic)j)%TgV4 za$L(&^GZAt^HOqBi;5K#l+sg6GV_R6n_pU@H2uw9rpeO_jG2U4brlS)xu#DrW-^#Q zXCD(klY+u@n|(~u(Ot7`3MF+t0)cwuYOn;xOctUdjKHk0i1Idg%*?We-bKAqi{ zQE2*oUS^T)(^Z+nSf=-9GHse}I-OBsyS5hdPDzna(Na^-58^@niCbiz9eq=yCh?;d E0A6;oF#rGn 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];