mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix for combination of "Only Cursor + Keypress" and "Always Show Sound Waves"
This commit is contained in:
parent
a47f7b8162
commit
4c938a050b
@ -123,12 +123,18 @@ if (_enabledTagsNearby) then {
|
||||
private _projDist = _relPos vectorDistance (_vecy vectorMultiply (_relPos vectorDotProduct _vecy));
|
||||
|
||||
private _drawSoundwave = (GVAR(showSoundWaves) > 0) && {[_target] call FUNC(isSpeaking)};
|
||||
private _alphaMax = _onKeyPressAlphaMax;
|
||||
if ((GVAR(showSoundWaves) == 2) && _drawSoundwave) then {
|
||||
_drawName = _drawSoundwave;
|
||||
_drawRank = false;
|
||||
_alphaMax = 1;
|
||||
};
|
||||
// Alpha:
|
||||
// - base value determined by GVAR(playerNamesMaxAlpha)
|
||||
// - decreases when _distance > _maxDistance
|
||||
// - increases when the unit is speaking
|
||||
// - it's clamped by the value of _onKeyPressAlphaMax
|
||||
private _alpha = (((1 + ([0, 0.2] select _drawSoundwave) - 0.2 * (_distance - _maxDistance)) min 1) * GVAR(playerNamesMaxAlpha)) min _onKeyPressAlphaMax;
|
||||
// - it's clamped by the value of _onKeyPressAlphaMax unless soundwaves are forced on and the unit is talking
|
||||
private _alpha = (((1 + ([0, 0.2] select _drawSoundwave) - 0.2 * (_distance - _maxDistance)) min 1) * GVAR(playerNamesMaxAlpha)) min _alphaMax;
|
||||
|
||||
if (_alpha > 0) then {
|
||||
[ACE_player, _target, _alpha, _distance * 0.026, _drawName, _drawRank, _drawSoundwave] call FUNC(drawNameTagIcon);
|
||||
|
Loading…
Reference in New Issue
Block a user