fix: getGunner returns null object when throwing grenades, planting explosives

This commit is contained in:
commy2 2015-04-10 06:47:31 +02:00
parent 105184ce88
commit d5f190dff8

View File

@ -17,7 +17,7 @@ _vehicle = _this select 0;
_weapon = _this select 1;
// on foot
if (gunner _vehicle == _vehicle && {_weapon in weapons _vehicle}) exitWith {gunner _vehicle};
if (gunner _vehicle == _vehicle && {_weapon in weapons _vehicle || {toLower _weapon in ["throw", "put"]}}) exitWith {gunner _vehicle};
// inside vehicle
private "_gunner";