From 907fda05a0609535d24925e2c62b6078995238d4 Mon Sep 17 00:00:00 2001 From: second_coming Date: Tue, 17 May 2016 21:42:51 +0100 Subject: [PATCH] V41 Updates --- changeLog.txt | 5 +++++ config.sqf | 10 +++++----- initServer.sqf | 2 +- scripts/eventHandlers/getIn.sqf | 5 +++++ scripts/functions/fnc_selectGear.sqf | 4 ++-- scripts/functions/fnc_selectName.sqf | 27 ++++++++++++++------------ scripts/functions/fnc_spawnStatics.sqf | 12 +++++++++--- 7 files changed, 42 insertions(+), 23 deletions(-) diff --git a/changeLog.txt b/changeLog.txt index 6f850ec..6ed0593 100644 --- a/changeLog.txt +++ b/changeLog.txt @@ -1,3 +1,8 @@ +================================================================================= +V41 (15-05-2016) +================================================================================= +Dead AI should be ejected from any captured land vehicle when you get in them + ================================================================================= V40 (12-05-2016) ================================================================================= diff --git a/config.sqf b/config.sqf index 1951c0c..e53cc51 100644 --- a/config.sqf +++ b/config.sqf @@ -160,7 +160,9 @@ SC_LootCrateItems = [ ["Exile_Item_WoodDoorwayKit",1,1], ["Exile_Item_WoodFloorPortKit",1,2], ["Exile_Item_Laptop",0,1], - ["Exile_Item_CodeLock",0,1] + ["Exile_Item_CodeLock",0,1], + ["Exile_Item_Cement",2,10], + ["Exile_Item_Sand",2,10] ]; SC_blackListedAreas = [ @@ -236,6 +238,8 @@ SC_BoatClassToUse = [ ["Exile_Boat_MotorBoat_Police",1] ]; +SC_useRealNames = true; + // Arrays of names used to generate names for AI SC_SurvivorFirstNames = ["John","Dave","Steve","Rob","Richard","Bob","Andrew","Nick","Adrian","Mark","Adam","Will","Graham"]; SC_SurvivorLastNames = ["Smith","Jones","Davids","Johnson","Jobs","Andrews","White","Brown","Taylor","Walker","Williams","Clarke","Jackson","Woods"]; @@ -310,8 +314,4 @@ publicVariable "SC_transportArray"; publicVariable "SC_SurvivorSide"; publicVariable "SC_BanditSide"; -// Override a few DMS settings -//DMS_Show_Kill_Poptabs_Notification = false; -//DMS_Show_Kill_Respect_Notification = false; - SC_CompiledOkay = true; \ No newline at end of file diff --git a/initServer.sqf b/initServer.sqf index ab2abc6..46dd3e6 100644 --- a/initServer.sqf +++ b/initServer.sqf @@ -2,7 +2,7 @@ // // Server Occupation script by second_coming // -SC_occupationVersion = "v39 (09-05-2016)"; +SC_occupationVersion = "v41 (17-05-2016)"; // // http://www.exilemod.com/profile/60-second_coming/ // diff --git a/scripts/eventHandlers/getIn.sqf b/scripts/eventHandlers/getIn.sqf index ecdedb2..e5776bf 100644 --- a/scripts/eventHandlers/getIn.sqf +++ b/scripts/eventHandlers/getIn.sqf @@ -6,6 +6,11 @@ _unit = _this select 2; if(isPlayer _unit) then { + _group = group _vehicle; + { + if(!alive _x) then { _x action ["EJECT", _vehicle]; }; + }forEach units _group; + [_vehicle] call SC_fnc_vehicleDestroyed; if(SC_extendedLogging) then diff --git a/scripts/functions/fnc_selectGear.sqf b/scripts/functions/fnc_selectGear.sqf index 2dd207b..0023434 100644 --- a/scripts/functions/fnc_selectGear.sqf +++ b/scripts/functions/fnc_selectGear.sqf @@ -72,7 +72,7 @@ if(_launcherChance < 40 OR isNil "_launcher") then { _launcher = ""; }; if(_weapon != "") then { _weaponMagazinesToAdd = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines"); - _weaponMagazineAmount = 1 + round random (1); + _weaponMagazineAmount = 2 + round random (1); _magazines pushBack [_weaponMagazinesToAdd select 0,_weaponMagazineAmount]; }; @@ -80,7 +80,7 @@ if(_weapon != "") then if(_pistol != "") then { _pistolMagazinesToAdd = getArray (configFile >> "CfgWeapons" >> _pistol >> "magazines"); - _pistolMagazineAmount = 1 + round random (1); + _pistolMagazineAmount = 2 + round random (1); _magazines pushBack [_pistolMagazinesToAdd select 0,_pistolMagazineAmount]; }; diff --git a/scripts/functions/fnc_selectName.sqf b/scripts/functions/fnc_selectName.sqf index a487500..607045c 100644 --- a/scripts/functions/fnc_selectName.sqf +++ b/scripts/functions/fnc_selectName.sqf @@ -3,18 +3,21 @@ _side = _this select 0; _firstName = "Tyler"; _lastName = "Durden"; -switch (_side) do +if(SC_useRealNames) then { - case "survivor": + switch (_side) do { - _firstName = SC_SurvivorFirstNames call BIS_fnc_selectRandom; - _lastName = SC_SurvivorLastNames call BIS_fnc_selectRandom; + case "survivor": + { + _firstName = SC_SurvivorFirstNames call BIS_fnc_selectRandom; + _lastName = SC_SurvivorLastNames call BIS_fnc_selectRandom; + }; + case "bandit": + { + _firstName = SC_BanditFirstNames call BIS_fnc_selectRandom; + _lastName = SC_BanditLastNames call BIS_fnc_selectRandom; + }; }; - case "bandit": - { - _firstName = SC_BanditFirstNames call BIS_fnc_selectRandom; - _lastName = SC_BanditLastNames call BIS_fnc_selectRandom; - }; -}; -_name = format["%1 %2",_firstName,_lastName]; -_name \ No newline at end of file + _name = format["%1 %2",_firstName,_lastName]; + _name +}; \ No newline at end of file diff --git a/scripts/functions/fnc_spawnStatics.sqf b/scripts/functions/fnc_spawnStatics.sqf index 6594fcd..bd3cafd 100644 --- a/scripts/functions/fnc_spawnStatics.sqf +++ b/scripts/functions/fnc_spawnStatics.sqf @@ -127,8 +127,9 @@ if(_side == "survivor") then { _currentSide = SC_SurvivorSide }; _wpPosition = _highest; diag_log format ["Static Patrol %3 waypoint added - building: %1 position: %2",_y,_highest,_group]; _i = _buildingPositions find _wpPosition; - _wp = _group addWaypoint [_wpPosition, 0] ; + _wp = _group addWaypoint [_wpPosition, 5] ; _wp setWaypointBehaviour "AWARE"; + _wp setWaypointSpeed "NORMAL"; _wp setWaypointCombatMode "RED"; _wp setWaypointCompletionRadius 1; _wp waypointAttachObject _y; @@ -137,10 +138,15 @@ if(_side == "survivor") then { _currentSide = SC_SurvivorSide }; }; } foreach _buildings; - if(count _buildings > 0 && !isNil "_wp") then + if(count _buildings > 1 && !isNil "_wp") then { _wp setWaypointType "CYCLE"; - }; + } + else + { + _group setBehaviour "AWARE"; + _group setCombatMode "RED"; + }; }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////