Added DynSim Toggle

This commit is contained in:
DESKTOP-UH65DCE\MusTanG 2017-04-24 20:32:35 -05:00
parent fa447be68c
commit 89036defd1
6 changed files with 48 additions and 6 deletions

View File

@ -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;

View File

@ -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;
};

View File

@ -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;

View File

@ -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;

View File

@ -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];

View File

@ -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;