lifting fixes

This commit is contained in:
[VB]AWOL
2014-01-22 18:07:26 -06:00
parent 44c1b62bde
commit 63ee278e82
5 changed files with 14 additions and 5 deletions

View File

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

View File

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

View File

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

View File

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