fix fnc_binocularMagazine on remote and dead units

This commit is contained in:
commy2 2015-10-04 12:10:08 +02:00
parent 42ce11cfee
commit d9595b6176

View File

@ -12,6 +12,8 @@
* [player] call ace_common_fnc_binocularMagazine
*
* Public: Yes
*
* Note: Doesn't work on dead units
*/
#include "script_component.hpp"
@ -28,6 +30,9 @@ _mode = currentWeaponMode _unit;
_unit selectWeapon _binocular;
// didn't select the binocular (unit probably dead or not local). function won't work. quit with empty string
if (currentWeapon _unit != _binocular) exitWith {""};
_magazine = currentMagazine _unit;
[_unit, _muzzle, _mode] call FUNC(selectWeaponMode);