From b6951b7a13f0058416d34a7aaea0350e72e9f200 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 5 Jun 2015 16:37:27 -0500 Subject: [PATCH] #1022 - reset hearing deafness on respawn --- addons/hearing/XEH_postInit.sqf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index 7b584f8397..01b05e5f50 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -12,3 +12,9 @@ GVAR(playerVehAttenuation) = 1; //Update veh attunation when player veh changes ["playerVehicleChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call EFUNC(common,addEventHandler); ["playerTurretChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call EFUNC(common,addEventHandler); + +//Reset deafness on respawn (or remote control player switch) +["playerChanged", { + GVAR(currentDeafness) = 0; + GVAR(newStrength) = 0; +}] call EFUNC(common,addEventhandler);