mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
DynSim Toggle #2 Vehicles
This commit is contained in:
parent
89036defd1
commit
f105490cca
@ -20,7 +20,10 @@
|
||||
{
|
||||
{
|
||||
_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;
|
||||
if!(dynamicSimulationEnabled (vehicle _x))then
|
||||
{
|
||||
(vehicle _x) enableSimulationGlobal false;
|
||||
};
|
||||
} forEach _units;
|
||||
|
||||
_x setVariable ["DMS_isGroupFrozen",true];
|
||||
|
@ -24,7 +24,10 @@ if (_freeze) then
|
||||
{
|
||||
{
|
||||
_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;
|
||||
if!(dynamicSimulationEnabled (vehicle _x))then
|
||||
{
|
||||
(vehicle _x) enableSimulationGlobal true;
|
||||
};
|
||||
} forEach (units _group);
|
||||
|
||||
_group setVariable ["DMS_isGroupFrozen",false];
|
||||
|
@ -142,7 +142,10 @@
|
||||
{
|
||||
_x allowDamage true;
|
||||
_x enableRopeAttach 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;
|
||||
|
||||
{
|
||||
|
@ -143,7 +143,10 @@
|
||||
{
|
||||
_x allowDamage true;
|
||||
_x enableRopeAttach 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;
|
||||
|
||||
{
|
||||
|
@ -105,7 +105,14 @@ if (!(_grpUnits isEqualTo []) && {(leader _grp) isEqualTo _unit}) then
|
||||
private _av = _unit getVariable ["DMS_AssignedVeh",objNull];
|
||||
if (!isNull _av) then
|
||||
{
|
||||
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;};}];
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user