mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-23 04:22:13 +03:00
1.0.1.7 DEV TEST fixes
Fixes to towing, player login, and vehicle EH
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_abort","_canSize","_configVeh","_capacity","_nameText","_isOk","_findNearestVehicles","_findNearestVehicle","_IsNearVehicle"];
|
||||
private ["_vehicle","_started","_finished","_animState","_isMedic","_abort","_configVeh","_nameText","_findNearestVehicles","_findNearestVehicle","_IsNearVehicle","_towTruck"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Already in progress." , "PLAIN DOWN"] };
|
||||
TradeInprogress = true;
|
||||
|
||||
// Tow Truck
|
||||
_towTruck = _this;
|
||||
_towTruck = _this select 3;
|
||||
|
||||
// Get all nearby vehicles within 10m
|
||||
_findNearestVehicles = nearestObjects [_towTruck, ["Car"], 10];
|
||||
_findNearestVehicle = [];
|
||||
{
|
||||
if (alive _x and _towTruck != _x) then {
|
||||
//diag_log ("SizeOF: " + str(sizeOf _x));
|
||||
if (alive _x and _towTruck != _x and (sizeOf _x) < 10) then {
|
||||
// within brounding box
|
||||
if([_x,_towTruck] call fnc_isInsideBuilding2) then {
|
||||
_findNearestVehicle set [(count _findNearestVehicle),_x];
|
||||
@@ -71,12 +72,17 @@ if(_IsNearVehicle >= 1) then {
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
if(typeOf _towTruck == "VIL_asistvan_DZE" ) then {
|
||||
_vehicle attachTo [_towTruck];
|
||||
_towTruck setVariable ["DZEinTow", true, true];
|
||||
_towTruck setVariable ["DZEvehicleInTow", _vehicle, true];
|
||||
cutText [format["%1 has been attached to Tow Truck.",_nameText], "PLAIN DOWN"];
|
||||
if([_vehicle,_towTruck] call fnc_isInsideBuilding2) then {
|
||||
if(typeOf _towTruck == "VIL_asistvan_DZE" ) then {
|
||||
_vehicle attachTo [_towTruck];
|
||||
_towTruck setVariable ["DZEinTow", true, true];
|
||||
_towTruck setVariable ["DZEvehicleInTow", _vehicle, true];
|
||||
cutText [format["%1 has been attached to Tow Truck.",_nameText], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
cutText [format["Failed to attach %1 to Tow Truck.",_nameText], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_abort","_canSize","_configVeh","_capacity","_nameText","_isOk","_findNearestVehicles","_findNearestVehicle","_IsNearVehicle"];
|
||||
private ["_vehicle","_started","_finished","_animState","_isMedic","_configVeh","_nameText","_towTruck","_inTow"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Already in progress." , "PLAIN DOWN"] };
|
||||
TradeInprogress = true;
|
||||
|
||||
// Tow Truck
|
||||
_towTruck = _this;
|
||||
_towTruck = _this select 3;
|
||||
|
||||
// exit if no vehicle is in tow.
|
||||
_inTow = _towTruck getVariable ["DZEinTow", false]
|
||||
_inTow = _towTruck getVariable ["DZEinTow", false];
|
||||
|
||||
if(!_inTow) then {
|
||||
if(_inTow) then {
|
||||
|
||||
// select the nearest one
|
||||
_vehicle = _towTruck getVariable ["DZEvehicleInTow", false];
|
||||
@@ -55,7 +55,6 @@ if(!_inTow) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
_abort = true;
|
||||
};
|
||||
|
||||
if (_finished) then {
|
||||
@@ -63,7 +62,7 @@ if(!_inTow) then {
|
||||
detach _vehicle;
|
||||
_towTruck setVariable ["DZEinTow", false, true];
|
||||
_towTruck setVariable ["DZEvehicleInTow", objNull, true];
|
||||
cutText [format["%1 has been dettached from Tow Truck.",_nameText], "PLAIN DOWN"];
|
||||
cutText [format["%1 has been detached from Tow Truck.",_nameText], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user