mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Add option for VectorUp on spawned objects.
Some of the objects used in POIs require the use of the setVectorUp command in order to maintain an upright orientation on a sloped surface. This addition adds the option for including the object's up vector in the compact arrays. Test file: https://github.com/worldwidesorrow/Svetlojarsk
This commit is contained in:
@@ -15,9 +15,9 @@
|
|||||||
Params:
|
Params:
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
["ObjectType1", [position], dir],
|
["ObjectType1", [position], dir, vectorUp(optional)],
|
||||||
["ObjectType2", [position], dir],
|
["ObjectType2", [position], dir, vectorUp(optional)],
|
||||||
["ObjectType3", [position], dir]
|
["ObjectType3", [position], dir, vectorUp(optional)]
|
||||||
],
|
],
|
||||||
false, // Block damage
|
false, // Block damage
|
||||||
false, // Use setPosATL instead of setPos
|
false, // Use setPosATL instead of setPos
|
||||||
@@ -63,8 +63,12 @@ _fires = [
|
|||||||
_object setPos (_x select 1);
|
_object setPos (_x select 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (count _x > 3) then {
|
||||||
|
_object setVectorUp (_x select 3);
|
||||||
|
};
|
||||||
|
|
||||||
if (_blockDamage) then {
|
if (_blockDamage) then {
|
||||||
_object addEventHandler ["HandleDamage",{0}];
|
_object addEventHandler ["HandleDamage",{0}];
|
||||||
if !(_type in _fires) then {_object enableSimulation false;};
|
if !(_type in _fires) then {_object enableSimulation false;};
|
||||||
};
|
};
|
||||||
} forEach _objects;
|
} forEach _objects;
|
||||||
|
|||||||
Reference in New Issue
Block a user