mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix #173
This commit is contained in:
parent
58ea333b42
commit
bc0dae63ca
@ -15,7 +15,17 @@ EXPLODE_2_PVT(_this,_player,_target);
|
||||
|
||||
// Return true for static weapons if they have been fired once, @todo 1.40 this work-around doesn't work anymore
|
||||
if (_target isKindOf "StaticWeapon") exitWith {
|
||||
(currentMagazine _target) != ""
|
||||
if (currentMagazine _target != "") exitWith {true};
|
||||
|
||||
private ["_magazines","_found"];
|
||||
_magazines = magazinesAmmoFull _target;
|
||||
_found = false;
|
||||
{
|
||||
if (_x select 2) exitWith {
|
||||
_found = true;
|
||||
};
|
||||
} forEach _magazines;
|
||||
_found
|
||||
};
|
||||
|
||||
// Return false for all other vehicles
|
||||
|
@ -28,8 +28,20 @@ if (_target isKindOf "StaticWeapon") then {
|
||||
_muzzle = _weapon;
|
||||
};
|
||||
};
|
||||
|
||||
if (_magazine == "") then {
|
||||
// Try to get magazine using magazinesAmmoFull
|
||||
private ["_magazines"];
|
||||
_magazines = magazinesAmmoFull _target;
|
||||
{
|
||||
if (_x select 2) exitWith {
|
||||
_magazine = _x select 0;
|
||||
};
|
||||
} forEach _magazines;
|
||||
};
|
||||
};
|
||||
|
||||
if (_magazine == "") exitWith {};
|
||||
if (_weapon == "") exitWith {};
|
||||
if (typeName _muzzle != "STRING") then {_muzzle = _weapon};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user