Only cache info on death if not a spectator

This commit is contained in:
SilentSpike
2015-07-05 01:12:16 +01:00
parent 950aec38b7
commit bedde2197b

View File

@ -18,9 +18,11 @@ private ["_unit","_killer","_delay"];
_unit = _this select 0; _unit = _this select 0;
_killer = _this select 1; _killer = _this select 1;
//Cache resettable info first //Cache resettable info if player died while not already a spectator
GVAR(cachedGroup) = group _unit; if !(_unit getVariable [QGVAR(isSpectator),false]) then {
GVAR(cachedSide) = side GVAR(cachedGroup); GVAR(cachedGroup) = group _unit;
GVAR(cachedSide) = side GVAR(cachedGroup);
};
[_unit] joinSilent grpNull; [_unit] joinSilent grpNull;
if (["ace_hearing"] call EFUNC(common,isModLoaded)) then {EGVAR(hearing,disableVolumeUpdate) = true}; if (["ace_hearing"] call EFUNC(common,isModLoaded)) then {EGVAR(hearing,disableVolumeUpdate) = true};