ACE3/addons/hearing/XEH_postInit.sqf

37 lines
1.0 KiB
Plaintext
Raw Normal View History

2015-01-14 02:00:48 +00:00
#include "script_component.hpp"
2015-04-11 04:51:07 +00:00
if (!hasInterface) exitWith {};
2015-07-11 02:01:32 +00:00
GVAR(deafnessDV) = 0;
GVAR(deafnessPrior) = 0;
GVAR(volume) = 1;
2015-04-20 07:17:47 +00:00
GVAR(playerVehAttenuation) = 1;
2015-01-13 04:17:52 +00:00
2015-06-13 15:16:18 +00:00
GVAR(beep) = false;
GVAR(beep2) = false;
GVAR(time2) = 0;
GVAR(time3) = 0;
GVAR(time4) = 0;
2015-07-11 02:01:32 +00:00
["SettingsInitialized", {
// Spawn volume updating process
2015-08-13 21:42:20 +00:00
[FUNC(updateVolume), 1, [false]] call CBA_fnc_addPerFrameHandler;
2015-07-11 02:01:32 +00:00
}] call EFUNC(common,addEventHandler);
2015-04-11 04:21:54 +00:00
2015-04-11 04:51:07 +00:00
//Update veh attunation when player veh changes
2015-04-20 07:17:47 +00:00
["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", {
2015-07-11 02:01:32 +00:00
GVAR(deafnessDV) = 0;
GVAR(deafnessPrior) = 0;
2015-06-13 17:27:30 +00:00
ACE_player setvariable [QGVAR(deaf), false];
2015-07-11 02:30:47 +00:00
2015-06-13 15:16:18 +00:00
GVAR(beep) = false;
GVAR(beep2) = false;
GVAR(time2) = 0;
GVAR(time3) = 0;
GVAR(time4) = 0;
}] call EFUNC(common,addEventhandler);