mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 01:30:26 +03:00
force eject if vehicle is being towed/lifted
This commit is contained in:
@@ -13,7 +13,7 @@ if (isServer) then {
|
||||
_this removeAllEventHandlers "GetOut";
|
||||
_this removeAllEventHandlers "GetIn";
|
||||
_this addEventHandler ["GetOut", {[(_this select 0),"all"] call server_updateObject;}];
|
||||
_this addEventHandler ["GetIn", {[(_this select 0),"all"] call server_updateObject;}];
|
||||
_this addEventHandler ["GetIn", {[(_this select 0),"all"] call server_updateObject; _this call server_checkIfTowed;}];
|
||||
};
|
||||
|
||||
//diag_log(format["%1: all EH reset for %2", __FILE__, _this]);
|
||||
@@ -180,6 +180,18 @@ server_hiveReadWriteLarge = {
|
||||
_resultArray
|
||||
};
|
||||
|
||||
server_checkIfTowed = {
|
||||
private ["_vehicle","_player","_attached"];
|
||||
if (DZE_HeliLift) then {
|
||||
_vehicle = _this select 0;
|
||||
_player = _this select 2;
|
||||
_attached = _vehicle getVariable["attached",false];
|
||||
if ((typeName _attached == "OBJECT")) then {
|
||||
_player action [ "eject", _vehicle)];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
server_characterSync = {
|
||||
private ["_characterID","_playerPos","_playerGear","_playerBackp","_medical","_currentState","_currentModel","_key"];
|
||||
_characterID = _this select 0;
|
||||
|
||||
Reference in New Issue
Block a user