mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-04 15:22:53 +03:00
Fix change clothes and login over sea level
This also aims for the fix that the player still gets damaged while in debug. It looks like that allowDamage gets lifted when it should not. fn_exitSwim set too early the damage true which can be a problem. Ive decided to remove the handled damage from fn_exitSwim and set allowDamage always false before we enter this function. This needs intensive testing to be sure it works without any new problems. Thx to ndavalos and iben.
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
//This workaround reliably exits swimming after a setPos directly from water to land or air.
|
||||
//"Getting out while IsMoveOutInProgress" prints to client RPT, but it's needed to complete quickly and should be harmless.
|
||||
|
||||
_unit = _this;
|
||||
_unit allowDamage false;
|
||||
_paraPosition = [_unit] call FNC_GetPos;
|
||||
_para = "ParachuteWest" createVehicleLocal [0,0,0];
|
||||
_para setPos _paraPosition;
|
||||
local _unit = _this;
|
||||
local _paraPosition = [_unit] call FNC_GetPos;
|
||||
local _para = "ParachuteWest" createVehicleLocal [0,0,0];
|
||||
_para setPos [(_paraPosition select 0),(_paraPosition select 1),(_paraPosition select 2) + 0.1];
|
||||
_unit moveInDriver _para;
|
||||
deleteVehicle _para;
|
||||
_unit setPosATL _paraPosition;
|
||||
_unit allowDamage true;
|
||||
|
||||
if (surfaceiswater _paraPosition) then {
|
||||
_unit setPosASL _paraPosition;
|
||||
} else {
|
||||
_unit setPosATL _paraPosition;
|
||||
};
|
||||
Reference in New Issue
Block a user