mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
lifting fixes
This commit is contained in:
@@ -36,6 +36,7 @@ while {r_doLoop} do {
|
||||
_posL = getPos _liftHeli;
|
||||
_posC = getPos _vehicle;
|
||||
_height = (_posL select 2) - (_posC select 2);
|
||||
/*
|
||||
if(_height < 20) then {
|
||||
if(((abs((_posL select 0) - (_posC select 0))) < 10) and ((abs((_posL select 1) - (_posC select 1))) < 10)) then {
|
||||
_moved = true;
|
||||
@@ -43,6 +44,7 @@ while {r_doLoop} do {
|
||||
} else {
|
||||
_moved = true;
|
||||
};
|
||||
*/
|
||||
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
@@ -74,10 +76,6 @@ if(_finished) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
|
||||
if ((count (crew _vehicle)) > 0) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
|
||||
if(typeName _attached == typeName false) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
|
||||
@@ -274,6 +274,8 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
} forEach DZE_HeliAllowToTow;
|
||||
};
|
||||
|
||||
//diag_log format["CREW: %1 ALLOW: %2",(count (crew _cursorTarget)),_allowTow];
|
||||
|
||||
if (_allowTow) then {
|
||||
_liftHelis = nearestObjects [player, DZE_HeliAllowTowFrom, 15];
|
||||
{
|
||||
@@ -291,6 +293,9 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
};
|
||||
} forEach _liftHelis;
|
||||
};
|
||||
|
||||
//diag_log format["HELI: %1 TARGET: %2",_found,_cursorTarget];
|
||||
|
||||
_attached = _cursorTarget getVariable["attached",false];
|
||||
if(_found and _allowTow and _canDo and !locked _cursorTarget and !_isPZombie and (typeName _attached != "OBJECT")) then {
|
||||
if (s_player_heli_lift < 0) then {
|
||||
|
||||
@@ -493,6 +493,9 @@ if(isNil "DZE_MissionLootTable") then {
|
||||
if(isNil "DZE_LootSpawnTimer") then {
|
||||
DZE_LootSpawnTimer = 10;
|
||||
};
|
||||
if(isNil "DZE_HeliLift") then {
|
||||
DZE_HeliLift = true;
|
||||
};
|
||||
|
||||
// needed on server
|
||||
if(isNil "DZE_PlotPole") then {
|
||||
|
||||
@@ -187,7 +187,10 @@ server_checkIfTowed = {
|
||||
_player = _this select 2;
|
||||
_attached = _vehicle getVariable["attached",false];
|
||||
if ((typeName _attached == "OBJECT")) then {
|
||||
_player action [ "eject", _vehicle)];
|
||||
_player action ["eject", _vehicle];
|
||||
detach _vehicle;
|
||||
_vehicle setVariable["attached",false,true];
|
||||
_attached setVariable["hasAttached",false,true];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user