diff --git a/@ExileServer/addons/a3_dms/scripts/fn_FillCrate.sqf b/@ExileServer/addons/a3_dms/scripts/fn_FillCrate.sqf index 27febe0..ae48172 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_FillCrate.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_FillCrate.sqf @@ -104,8 +104,14 @@ if !(_crate getVariable ["DMS_CrateGodMode",DMS_GodmodeCrates]) then { _crate allowDamage true; }; - -_crate enableSimulationGlobal true; +if(dynamicSimulationSystemEnabled)then +{ + _crate enableDynamicSimulation true; +} +else +{ + _crate enableSimulationGlobal true; +}; if (_crate getVariable ["DMS_CrateEnableRope",DMS_EnableBoxMoving]) then { _crate enableRopeAttach true; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_FreezeManager.sqf b/@ExileServer/addons/a3_dms/scripts/fn_FreezeManager.sqf index e4f2bbe..4f3a6e4 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_FreezeManager.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_FreezeManager.sqf @@ -20,7 +20,10 @@ { { _x enableSimulationGlobal true; - (vehicle _x) enableSimulationGlobal true; + if!(dynamicSimulationEnabled (vehicle _x))then + { + (vehicle _x) enableSimulationGlobal true; + }; } forEach _units; _x setVariable ["DMS_isGroupFrozen",false]; @@ -81,7 +84,10 @@ { { _x enableSimulationGlobal false; - (vehicle _x) enableSimulationGlobal false; + if!(dynamicSimulationEnabled (vehicle _x))then + { + (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 02f1a47..9766b88 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_FreezeToggle.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_FreezeToggle.sqf @@ -24,7 +24,10 @@ if (_freeze) then { { _x enableSimulationGlobal false; - (vehicle _x) enableSimulationGlobal false; + if!(dynamicSimulationEnabled (vehicle _x))then + { + (vehicle _x) enableSimulationGlobal false; + }; } forEach (units _group); _group setVariable ["DMS_isGroupFrozen",true]; @@ -33,7 +36,10 @@ else { { _x enableSimulationGlobal true; - (vehicle _x) enableSimulationGlobal true; + if!(dynamicSimulationEnabled (vehicle _x))then + { + (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 8e91278..5c78252 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E.sqf @@ -51,7 +51,14 @@ private _objs = _export apply { // Create the object private _obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"]; - _obj enableSimulationGlobal false; + if(dynamicSimulationSystemEnabled)then + { + _obj enableDynamicSimulation true; + } + else + { + _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 88d0a06..7c4ccb7 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN.sqf @@ -52,7 +52,14 @@ 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)); - _object enableSimulationGlobal ((_x select 3) select 0); + if(dynamicSimulationSystemEnabled)then + { + _object enableDynamicSimulation true; + } + else + { + _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 d793a1d..dac1f2c 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN_Convert.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN_Convert.sqf @@ -55,7 +55,14 @@ private _objs = _export apply _object setPosASL ((_x select 1) vectorAdd [0,0,5000]); _object setVectorDirAndUp (_x select 2); - _object enableSimulationGlobal ((_x select 3) select 0); + if(dynamicSimulationSystemEnabled)then + { + _object enableDynamicSimulation true; + } + else + { + _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 0732d29..426e32b 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN_Static.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_3DEN_Static.sqf @@ -49,7 +49,14 @@ private _objs = _export apply _object setPosASL (_x select 1); _object setVectorDirAndUp (_x select 2); - _object enableSimulationGlobal ((_x select 3) select 0); + if(dynamicSimulationSystemEnabled)then + { + _object enableDynamicSimulation true; + } + else + { + _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 492abe9..52277b7 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_Convert.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_Convert.sqf @@ -52,7 +52,14 @@ 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; + if(dynamicSimulationSystemEnabled)then + { + _object enableDynamicSimulation true; + } + else + { + _object enableSimulationGlobal false; + }; private _pos = (_x select 1) vectorAdd [0,0,5000]; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_Static.sqf b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_Static.sqf index f2798bc..bc522a9 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_Static.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_ImportFromM3E_Static.sqf @@ -46,7 +46,14 @@ 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; + if(dynamicSimulationSystemEnabled)then + { + _obj enableDynamicSimulation true; + } + else + { + _obj enableSimulationGlobal false; + }; private _pos = _x select 1; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_MissionsMonitor_Dynamic.sqf b/@ExileServer/addons/a3_dms/scripts/fn_MissionsMonitor_Dynamic.sqf index ab54d0f..d9b7594 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_MissionsMonitor_Dynamic.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_MissionsMonitor_Dynamic.sqf @@ -142,7 +142,10 @@ { _x allowDamage true; _x enableRopeAttach true; - _x enableSimulationGlobal true; + if!(dynamicSimulationEnabled _x)then + { + _x enableSimulationGlobal true; + }; if (_x getVariable ["ExileIsPersistent", false]) then { @@ -162,7 +165,7 @@ _x lock 1; }; - _x call ExileServer_system_simulationMonitor_addVehicle; + //_x call ExileServer_system_simulationMonitor_addVehicle; } forEach _vehs; { diff --git a/@ExileServer/addons/a3_dms/scripts/fn_MissionsMonitor_Static.sqf b/@ExileServer/addons/a3_dms/scripts/fn_MissionsMonitor_Static.sqf index 69979eb..1b1c19a 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_MissionsMonitor_Static.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_MissionsMonitor_Static.sqf @@ -143,7 +143,10 @@ { _x allowDamage true; _x enableRopeAttach true; - _x enableSimulationGlobal true; + if!(dynamicSimulationEnabled _x)then + { + _x enableSimulationGlobal true; + }; if (_x getVariable ["ExileIsPersistent", false]) then { @@ -163,7 +166,7 @@ _x lock 1; }; - _x call ExileServer_system_simulationMonitor_addVehicle; + //_x call ExileServer_system_simulationMonitor_addVehicle; } forEach _vehs; { diff --git a/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf b/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf index fcc73d7..7e3ca5f 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf @@ -105,7 +105,14 @@ if (!(_grpUnits isEqualTo []) && {(leader _grp) isEqualTo _unit}) then private _av = _unit getVariable ["DMS_AssignedVeh",objNull]; if (!isNull _av) then { - _av enableSimulationGlobal true; + if(dynamicSimulationSystemEnabled)then + { + _av enableDynamicSimulation true; + } + else + { + _av enableSimulationGlobal true; + }; // Determine whether or not the vehicle has any active crew remaining. private _memCount = {[(alive _x),false] select (_unit isEqualTo _x);} count (crew _av); @@ -149,8 +156,16 @@ if (!isNull _av) then [_av, 1] remoteExecCall ["lock", _av]; }; - _av call ExileServer_system_simulationMonitor_addVehicle; + //_av call ExileServer_system_simulationMonitor_addVehicle; + if(dynamicSimulationSystemEnabled)then + { + _av enableDynamicSimulation true; + } + else + { + _av enableSimulationGlobal true; + }; _av setVariable ["ExileMoney",0,true]; _av setVariable ["ExileIsPersistent", false]; _av addMPEventHandler ["MPKilled", { if (isServer) then {_this call ExileServer_object_vehicle_event_onMPKilled;};}]; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_SpawnNonPersistentVehicle.sqf b/@ExileServer/addons/a3_dms/scripts/fn_SpawnNonPersistentVehicle.sqf index bb8359f..1bb96f4 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_SpawnNonPersistentVehicle.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_SpawnNonPersistentVehicle.sqf @@ -85,7 +85,14 @@ if (!isNil "AVS_Version") then _vehObj lock 2; _vehObj allowDamage false; _vehObj enableRopeAttach false; -_vehObj enableSimulationGlobal false; +if(dynamicSimulationSystemEnabled)then +{ + _vehObj enableDynamicSimulation true; +} +else +{ + _vehObj enableSimulationGlobal false; +}; if (DMS_DEBUG) then