From 55df8bb3f8c641f790b8588264f9a7f6d8fd059f Mon Sep 17 00:00:00 2001 From: eraser1 Date: Sat, 2 Sep 2017 00:41:07 -0500 Subject: [PATCH] Somebody did a thing! https://github.com/Defent/DMS_Exile/wiki/Changelog#september-2-2017-1240-pm-cst-america --- @ExileServer/addons/a3_dms/config.cpp | 2 +- @ExileServer/addons/a3_dms/config.sqf | 1 + .../addons/a3_dms/scripts/fn_FillCrate.sqf | 14 ++++---------- .../addons/a3_dms/scripts/fn_FreezeManager.sqf | 10 ++-------- .../addons/a3_dms/scripts/fn_FreezeToggle.sqf | 12 +++--------- .../addons/a3_dms/scripts/fn_ImportFromM3E.sqf | 6 +----- .../a3_dms/scripts/fn_ImportFromM3E_3DEN.sqf | 9 +-------- .../scripts/fn_ImportFromM3E_3DEN_Convert.sqf | 10 +--------- .../scripts/fn_ImportFromM3E_3DEN_Static.sqf | 10 +--------- .../a3_dms/scripts/fn_ImportFromM3E_Convert.sqf | 8 ++------ .../a3_dms/scripts/fn_ImportFromM3E_Static.sqf | 8 ++------ @ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf | 12 ++++++------ README.md | 7 ++++--- 13 files changed, 29 insertions(+), 80 deletions(-) diff --git a/@ExileServer/addons/a3_dms/config.cpp b/@ExileServer/addons/a3_dms/config.cpp index 70e7411..27806c4 100644 --- a/@ExileServer/addons/a3_dms/config.cpp +++ b/@ExileServer/addons/a3_dms/config.cpp @@ -4,7 +4,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; - a3_DMS_version = "June 8, 2017"; + a3_DMS_version = "September 2, 2017"; requiredVersion = 1.68; requiredAddons[] = {"exile_client","exile_server_config"}; }; diff --git a/@ExileServer/addons/a3_dms/config.sqf b/@ExileServer/addons/a3_dms/config.sqf index 263b661..27a7147 100644 --- a/@ExileServer/addons/a3_dms/config.sqf +++ b/@ExileServer/addons/a3_dms/config.sqf @@ -167,6 +167,7 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc DMS_HideBox = false; // "Hide" the box from being visible by players until the mission is completed. DMS_EnableBoxMoving = true; // Whether or not to allow the box to move and/or be lifted by choppers. DMS_SpawnBoxSmoke = true; // Spawn a smoke grenade on mission box upon misson completion during daytime + DMS_DefaultSmokeClassname = "SmokeShellPurple"; // Classname of the smoke you want to spawn. DMS_SpawnBoxIRGrenade = true; // Spawn an IR grenade on mission box upon misson completion during nighttime /*Crate/Box settings*/ diff --git a/@ExileServer/addons/a3_dms/scripts/fn_FillCrate.sqf b/@ExileServer/addons/a3_dms/scripts/fn_FillCrate.sqf index 42c9cd1..a46889c 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_FillCrate.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_FillCrate.sqf @@ -104,19 +104,13 @@ if !(_crate getVariable ["DMS_CrateGodMode",DMS_GodmodeCrates]) then { _crate allowDamage true; }; -if(dynamicSimulationSystemEnabled)then -{ - _crate enableDynamicSimulation true; -} -else -{ - _crate enableSimulationGlobal true; -}; if (_crate getVariable ["DMS_CrateEnableRope",DMS_EnableBoxMoving]) then { _crate enableRopeAttach true; }; +_crate enableSimulationGlobal true; + if ((_lootValues isEqualType []) && {!((_lootValues select 1) isEqualType {})}) then { @@ -309,9 +303,9 @@ if (DMS_RareLoot) then // You can choose if you want to enable/disable smoke individually using setVariable. if (_crate getVariable ["DMS_AllowSmoke", true]) then { - if (DMS_SpawnBoxSmoke && {sunOrMoon == 1}) then + if (DMS_SpawnBoxSmoke && {sunOrMoon isEqualTo 1}) then { - private _marker = "SmokeShellPurple" createVehicle getPosATL _crate; + private _marker = (_crate getVariable ["DMS_CrateSmokeClassname", DMS_DefaultSmokeClassname]) createVehicle getPosATL _crate; _marker setPosATL (getPosATL _crate); _marker attachTo [_crate,[0,0,0]]; }; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_FreezeManager.sqf b/@ExileServer/addons/a3_dms/scripts/fn_FreezeManager.sqf index 4f3a6e4..e4f2bbe 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_FreezeManager.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_FreezeManager.sqf @@ -20,10 +20,7 @@ { { _x enableSimulationGlobal true; - if!(dynamicSimulationEnabled (vehicle _x))then - { - (vehicle _x) enableSimulationGlobal true; - }; + (vehicle _x) enableSimulationGlobal true; } forEach _units; _x setVariable ["DMS_isGroupFrozen",false]; @@ -84,10 +81,7 @@ { { _x enableSimulationGlobal false; - if!(dynamicSimulationEnabled (vehicle _x))then - { - (vehicle _x) enableSimulationGlobal false; - }; + (vehicle _x) enableSimulationGlobal false; } forEach _units; _x setVariable ["DMS_isGroupFrozen",true]; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_FreezeToggle.sqf b/@ExileServer/addons/a3_dms/scripts/fn_FreezeToggle.sqf index 9766b88..5cc6377 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_FreezeToggle.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_FreezeToggle.sqf @@ -24,10 +24,7 @@ if (_freeze) then { { _x enableSimulationGlobal false; - if!(dynamicSimulationEnabled (vehicle _x))then - { - (vehicle _x) enableSimulationGlobal false; - }; + (vehicle _x) enableSimulationGlobal false; } forEach (units _group); _group setVariable ["DMS_isGroupFrozen",true]; @@ -36,11 +33,8 @@ else { { _x enableSimulationGlobal true; - if!(dynamicSimulationEnabled (vehicle _x))then - { - (vehicle _x) enableSimulationGlobal true; - }; + (vehicle _x) enableSimulationGlobal true; } forEach (units _group); - + _group setVariable ["DMS_isGroupFrozen",false]; }; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E.sqf b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E.sqf index 4d8424d..8e91278 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E.sqf @@ -51,11 +51,7 @@ private _objs = _export apply { // Create the object private _obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"]; - - if (dynamicSimulationSystemEnabled) then - { - _obj enableDynamicSimulation true; - }; + _obj enableSimulationGlobal false; // Calculate the object's position using provided relative position private _objPos = [_pos,_x select 1] call DMS_fnc_CalcPos; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN.sqf b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN.sqf index 7c4ccb7..88d0a06 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN.sqf @@ -52,14 +52,7 @@ private _objs = _export apply private _object = (_x select 0) createVehicle [0,0,0]; _object setDir (_x select 2); _object setPosATL (_center vectorAdd (_x select 1)); - if(dynamicSimulationSystemEnabled)then - { - _object enableDynamicSimulation true; - } - else - { - _object enableSimulationGlobal ((_x select 3) select 0); - }; + _object enableSimulationGlobal ((_x select 3) select 0); _object allowDamage ((_x select 3) select 1); _object; }; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN_Convert.sqf b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN_Convert.sqf index dac1f2c..a4ffcb6 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN_Convert.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN_Convert.sqf @@ -54,15 +54,7 @@ private _objs = _export apply private _object = (_x select 0) createVehicle [0,0,0]; _object setPosASL ((_x select 1) vectorAdd [0,0,5000]); _object setVectorDirAndUp (_x select 2); - - if(dynamicSimulationSystemEnabled)then - { - _object enableDynamicSimulation true; - } - else - { - _object enableSimulationGlobal ((_x select 3) select 0); - }; + _object enableSimulationGlobal ((_x select 3) select 0); _object allowDamage ((_x select 3) select 1); _object; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN_Static.sqf b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN_Static.sqf index 426e32b..f39d7fc 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN_Static.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN_Static.sqf @@ -48,15 +48,7 @@ private _objs = _export apply private _object = (_x select 0) createVehicle [0,0,0]; _object setPosASL (_x select 1); _object setVectorDirAndUp (_x select 2); - - if(dynamicSimulationSystemEnabled)then - { - _object enableDynamicSimulation true; - } - else - { - _object enableSimulationGlobal ((_x select 3) select 0); - }; + _object enableSimulationGlobal ((_x select 3) select 0); _object allowDamage ((_x select 3) select 1); _object; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_Convert.sqf b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_Convert.sqf index b6f0680..492abe9 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_Convert.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_Convert.sqf @@ -52,23 +52,19 @@ if ((isNil "_export") || {!(_export isEqualType [])}) exitWith private _objs = _export apply { private _obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"]; + _obj enableSimulationGlobal false; + private _pos = (_x select 1) vectorAdd [0,0,5000]; if (_x select 4) then { _obj setDir (_x select 2); _obj setPosATL _pos; - - if (dynamicSimulationSystemEnabled) then - { - _object enableDynamicSimulation true; - }; } else { _obj setPosATL _pos; _obj setVectorDirAndUp (_x select 3); - _obj enableSimulationGlobal false; }; _obj; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_Static.sqf b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_Static.sqf index 77ee5e3..f2798bc 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_Static.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_Static.sqf @@ -46,23 +46,19 @@ if ((isNil "_export") || {!(_export isEqualType [])}) exitWith private _objs = _export apply { private _obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"]; + _obj enableSimulationGlobal false; + private _pos = _x select 1; if (_x select 4) then { _obj setDir (_x select 2); _obj setPosATL _pos; - - if(dynamicSimulationSystemEnabled)then - { - _obj enableDynamicSimulation true; - }; } else { _obj setPosATL _pos; _obj setVectorDirAndUp (_x select 3); - _obj enableSimulationGlobal false; }; _obj; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf b/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf index 833d768..699ec70 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf @@ -64,7 +64,7 @@ if ((_unit getVariable ["DMS_ai_remove_launchers",DMS_ai_remove_launchers]) && { _unit spawn { - sleep 0.5; + uiSleep 0.5; { _holder = _x; @@ -213,7 +213,7 @@ if (!isNull _av) then diag_log format ["DMS Seat Switcher :: Temporarily setting owner of %1 to server from %2. Success: %3",_grp,_owner,_grp setGroupOwner 2]; }; - sleep 5+(random 3); // 5 to 8 seconds delay after gunner death + uiSleep 5+(random 3); // 5 to 8 seconds delay after gunner death if !(alive _driver) exitWith {}; @@ -235,7 +235,7 @@ if (!isNull _av) then _driver assignAsGunner _av; [_driver] orderGetIn true; - sleep 1.5; + uiSleep 1.5; if !(alive _driver) exitWith {}; _driver moveInGunner _av; @@ -262,7 +262,7 @@ if (!isNull _av) then (((gunner _av) isEqualTo _driver) || {(time-_start)>30}) }; - sleep 3; + uiSleep 3; _start = time; @@ -277,9 +277,9 @@ if (!isNull _av) then }; _driver doTarget _killer; - _driver doFire _killer; + _driver doSuppressiveFire _killer; - sleep 15; + uiSleep 15; diag_log format ["DMS Seat Switcher :: Resetting ownership of %1 to %2. Success: %3",_grp,_owner,_grp setGroupOwner _owner]; }; diff --git a/README.md b/README.md index 317b9bf..48ca8cc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![ArmA 1.68](https://img.shields.io/badge/Arma-1.68-blue.svg) ![Exile 1.0.3 "Lemon"](https://img.shields.io/badge/Exile-1.0.3%20Lemon-C72651.svg) ![DMS Version](https://img.shields.io/badge/DMS%20Version-2017--06--08-blue.svg) +![ArmA 1.68](https://img.shields.io/badge/Arma-1.68-blue.svg) ![Exile 1.0.3 "Lemon"](https://img.shields.io/badge/Exile-1.0.3%20Lemon-C72651.svg) ![DMS Version](https://img.shields.io/badge/DMS%20Version-2017--09--02-blue.svg) # To the User: @@ -119,8 +119,9 @@ ___ - [maca134](http://maca134.co.uk/portfolio/m3editor-arma-3-map-editor/) for M3Editor Stuff - [Darth Rogue from SOA](http://soldiersofanarchy.net/) for the awesome base for the first DMS static mission :D - [William from Refugees of the Fallen](http://rtfgaming.com/) for the amazing slums static mission base and ideas :) -- [DONKEYPUNCH](https://github.com/donkeypunchepoch) for everything on the [February 17th 2016 commit](https://github.com/Defent/DMS_Exile#february-17-2016-600-pm-cst-america) ;) -- Everbody's feedback on [the DMS thread on exile forums](http://www.exilemod.com/topic/61-dms-defents-mission-system/?do=findComment&comment=242) +- [DONKEYPUNCH](https://github.com/donkeypunchepoch) for everything on the [February 17th 2016 commit](https://github.com/Defent/DMS_Exile/wiki/Changelog#february-17-2016-600-pm-cst-america) ;) +- [MGTDB](https://github.com/MGTDB) for the plethora of fixes, testing, and all-around doing our work for us :P +- Everybody's feedback on [the DMS thread on exile forums](http://www.exilemod.com/topic/61-dms-defents-mission-system/?do=findComment&comment=242) #### Testers/Reporters: - [William from Refugees of the Fallen](http://rtfgaming.com/)