mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 01:30:26 +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:
@@ -10,7 +10,7 @@ _old removeAllEventHandlers "HandleDamage";
|
||||
_old removeAllEventHandlers "Killed";
|
||||
_old removeAllEventHandlers "Fired";
|
||||
_old allowDamage false;
|
||||
_old AddEventHandler ["HandleDamage", {False}];
|
||||
_old addEventHandler ["handleDamage", {0}];
|
||||
|
||||
//Logout
|
||||
local _humanity = player getVariable ["humanity",0];
|
||||
@@ -109,7 +109,7 @@ if (Z_SingleCurrency) then {
|
||||
call dayz_resetSelfActions; //New unit has no self actions yet. Reset variables so actions can be added back.
|
||||
dayz_actionInProgress = false; //Allow self actions to run now.
|
||||
|
||||
player removeAllEventHandlers "HandleDamage";
|
||||
player removeAllEventHandlers "handleDamage";
|
||||
eh_player_killed = player addeventhandler ["FiredNear",{_this call player_weaponFiredNear;}];
|
||||
[player] call fnc_usec_damageHandle;
|
||||
player allowDamage true;
|
||||
|
||||
Reference in New Issue
Block a user