Shorten some isKindOf checks

This commit is contained in:
ebaydayz
2017-01-28 21:04:26 -05:00
parent 9270050bc6
commit 611fd73bbd
3 changed files with 5 additions and 5 deletions

View File

@@ -54,7 +54,7 @@ if (!isNull _source) then {
_sourceWeapon = currentWeapon _source;
_sourceWeapon = switch true do {
case (_ammo in ["PipeBomb","Mine","MineE"]): {_ammo};
case (_sourceVehicleType isKindOf "LandVehicle" or _sourceVehicleType isKindOf "Air" or _sourceVehicleType isKindOf "Ship"): {_sourceVehicleType};
case ({_sourceVehicleType isKindOf _x} count ["LandVehicle","Air","Ship"] > 0): {_sourceVehicleType};
case (_sourceWeapon == "Throw"): {(weaponState _source) select 3};
default {_sourceWeapon};
};