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:
A Man
2022-04-16 17:20:28 +02:00
parent 8a7d937999
commit 876e264e33
5 changed files with 28 additions and 23 deletions

View File

@@ -235,19 +235,19 @@ if (typename _this == typename []) then {
_unit = _this select 0;
if (!local _unit) exitwith {};
_unit allowDamage false; //Prevent glitch death when opening chute
//--- Free fall
if (count _this == 2) exitwith { //Fresh spawn calling from player_monitor.fsm
_alt = _this select 1;
_unit call fn_exitSwim;
if (surfaceIsWater respawn_west_original) then {_unit call fn_exitSwim;};
_unit setvariable ["bis_fnc_halo_now",true];
_unit spawn bis_fnc_halo;
};
//-------------
_para = objnull;
_vel = [];
_unit allowDamage false; //Prevent glitch death when opening chute
_vel = [];
_paraPosition1 = [_unit] call FNC_GetPos;
_para = createVehicle ["ParachuteWest", _paraPosition1, [], 0, "CAN_COLLIDE"];
//_para = "BIS_Steerable_Parachute" createVehicle position _unit;