mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fix fnc_binocularMagazine on remote and dead units
This commit is contained in:
parent
42ce11cfee
commit
d9595b6176
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user