Update vanilla building

Vanilla commits:

2ee56936be

8497b42d3f

eb234f8b06
This commit is contained in:
ebaydayz
2017-01-22 14:41:53 -05:00
parent f8047167d8
commit ff6463473f
6 changed files with 48 additions and 15 deletions

View File

@@ -5,10 +5,26 @@ private ["_vehicle","_position","_unit","_buildables"];
_vehicle = _this select 0;
_position = _this select 1;
_unit = _this select 2;
/*
_fencesArray = ["WoodenFence_1","WoodenFence_2","WoodenFence_3","WoodenFence_4","WoodenFence_5","WoodenFence_6","WoodenFence_7","WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4"];
//Hopefully returns the xyz of the vehicle seat pos.
_exitPosition = _vehicle modelToWorld (_vehicle selectionPosition ("pos " + _position));
*/
if (_unit == player) then {
//if (dayz_soundMuted) then {call player_toggleSoundMute;}; // Auto disable mute on vehicle exit (not a good idea without a sleep since rotor can be very loud when spinning down)
_buildables = count ((getposATL _vehicle) nearObjects ["DZ_buildables", 3]);
/*
//_buildables = count (_exitPosition nearObjects ["DZ_buildables", 3]);
//Check player location to exit location
_intersectsWith = lineIntersectsWith [[_position select 0, _position select 1, 0], [_exitPosition select 0, _exitPosition select 1, 0],_unit,_vehicle,true];
//_buildables = count ((getposATL _vehicle) nearObjects ["DZ_buildables", 3]);
_buildables = false;
//Scan all intersected items for base items return with true false
{
` _buildables = if (_x in _fencesArray) exitWith {true};
} count _intersectsWith;
//if intersects find builditem make player reenter vehicel
if (_buildables > 0) then {
switch _position do {
@@ -26,7 +42,7 @@ if (_unit == player) then {
localize "str_actions_exitBlocked" call dayz_rollingMessages;
};
*/
_vehicle call player_antiWall;
//Lets make sure we can process some dmg from ejecting from the vehicle even traveling at lower speeds.