From b2354dc5a641e047d546dbdedb0e83bd68737afd Mon Sep 17 00:00:00 2001 From: vbawol Date: Sat, 8 Jul 2017 18:52:42 -0500 Subject: [PATCH] enable dynamic simulation on vehicles --- Sources/epoch_code/init/both_init.sqf | 1 + .../compile/epoch_vehicle/EPOCH_load_vehicles.sqf | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Sources/epoch_code/init/both_init.sqf b/Sources/epoch_code/init/both_init.sqf index afb0968d..4f3221cc 100644 --- a/Sources/epoch_code/init/both_init.sqf +++ b/Sources/epoch_code/init/both_init.sqf @@ -111,3 +111,4 @@ _say3dsounds = "isClass _x" configClasses (_say3dsoundsConfig); // disable remote sensors on server and client as all Epoch AI is local to the side controlling it. disableRemoteSensors (["CfgEpochClient", "disableRemoteSensors", true] call EPOCH_fnc_returnConfigEntryV2); +enableDynamicSimulationSystem true; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf index 7ec842cd..33f7a5ba 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf @@ -42,7 +42,7 @@ for "_i" from 1 to _maxVehicleLimit do { if ((_response select 0) == 1 && (_response select 1) isEqualType []) then { _arr = _response select 1; _arrNum = count _arr; - + // New Upgrade System adds to DB array, check and correct older saved vehicles if (_arrNum < _dataFormatCount) then { { @@ -52,7 +52,7 @@ for "_i" from 1 to _maxVehicleLimit do { }; } foreach _dataFormat; }; - + if (_arrNum == _dataFormatCount) then { // Validate and replace invaild data @@ -86,7 +86,7 @@ for "_i" from 1 to _maxVehicleLimit do { _vehicle setVariable ["BIS_enableRandomization", false]; if !(isNull _vehicle) then { // make vehicle immune from damage. - _vehicle allowDamage false; + _vehicle allowDamage false; // store spawned vehicles in array to make one call to remains handler _allVehicles pushBack _vehicle; // remove selected slot from array and set on vehicle @@ -212,7 +212,7 @@ for "_i" from 1 to _maxVehicleLimit do { // vehicle simulation handler if (_simulationHandler) then{ - _vehicle enableSimulationGlobal false; + _vehicle enableDynamicSimulation true; }; // turrets /*