mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cleanup Spelling
This commit is contained in:
parent
8c449a454b
commit
e747234443
@ -1,4 +1,3 @@
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit) );
|
||||
|
@ -4,11 +4,11 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
GVAR(currentDeafness) = 0;
|
||||
GVAR(newStrength) = 0;
|
||||
GVAR(playerVehAttunation) = 1;
|
||||
GVAR(playerVehAttenuation) = 1;
|
||||
|
||||
// Spawn volume updating process
|
||||
[FUNC(updateVolume), 0.1, [] ] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
//Update veh attunation when player veh changes
|
||||
["playerVehicleChanged", {_this call FUNC(updatePlayerVehicleAttunation);}] call EFUNC(common,addEventHandler);
|
||||
["playerTurretChanged", {_this call FUNC(updatePlayerVehicleAttunation);}] call EFUNC(common,addEventHandler);
|
||||
["playerVehicleChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call EFUNC(common,addEventHandler);
|
||||
["playerTurretChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call EFUNC(common,addEventHandler);
|
||||
|
@ -10,7 +10,7 @@ PREP(hasEarPlugsIn);
|
||||
PREP(moduleHearing);
|
||||
PREP(putInEarPlugs);
|
||||
PREP(removeEarPlugs);
|
||||
PREP(updatePlayerVehicleAttunation);
|
||||
PREP(updatePlayerVehAttenuation);
|
||||
PREP(updateVolume);
|
||||
|
||||
ADDON = true;
|
||||
|
@ -1,15 +1,15 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Gets the sound attunation of a player to the outside.
|
||||
* Gets the sound attenuation of a player to the outside.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit (player) <OBJECT>
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* Ammount that unit can hear outside <NUMBER>
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_hearing_fnc_updatePlayerVehicleAttunation
|
||||
* [] call ace_hearing_fnc_updatePlayerVehAttenuation
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -19,10 +19,8 @@ _vehicle = vehicle ACE_player;
|
||||
|
||||
if (isNull _vehicle) exitWith {};
|
||||
|
||||
_newAttenuation = -1;
|
||||
if (ACE_player == _vehicle) then {
|
||||
_newAttenuation = 1;
|
||||
} else {
|
||||
_newAttenuation = 1;
|
||||
if (ACE_player != _vehicle) then {
|
||||
_effectType = "";
|
||||
_turretPath = [ACE_player] call EFUNC(common,getTurretIndex);
|
||||
_effectType = getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "attenuationEffectType");
|
||||
@ -38,19 +36,12 @@ if (ACE_player == _vehicle) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_newAttenuation = switch (true) do {
|
||||
case (_effectType == ""): {1};
|
||||
case (_effectType == "CarAttenuation"): {0.7};
|
||||
case (_effectType == "OpenCarAttenuation"): {1};
|
||||
case (_effectType == "TankAttenuation"): {0.1};
|
||||
case (_effectType == "HeliAttenuation"): {0.25};
|
||||
case (_effectType == "OpenHeliAttenuation"): {0.7};
|
||||
case (_effectType == "SemiOpenHeliAttenuation"): {0.5};
|
||||
case (_effectType == "HeliAttenuationGunner"): {0.75};
|
||||
case (_effectType == "HeliAttenuationRamp"): {0.75};
|
||||
default {1};
|
||||
};
|
||||
};
|
||||
|
||||
GVAR(playerVehAttunation) = _newAttenuation;
|
||||
TRACE_2("New vehicle attenuation",_vehicle,_newAttenuation);
|
||||
|
||||
GVAR(playerVehAttenuation) = _newAttenuation;
|
||||
|
Loading…
Reference in New Issue
Block a user