scopes: moved getWeaponIndex to common

This commit is contained in:
Nicolás Badano 2015-02-12 11:57:55 -03:00
parent a4815cb8ac
commit a3dc1df109
7 changed files with 7 additions and 5 deletions

View File

@ -75,6 +75,7 @@ PREP(getVehicleCargo);
PREP(getVehicleCodriver);
PREP(getVehicleCrew);
PREP(getWeaponAzimuthAndInclination);
PREP(getWeaponIndex);
PREP(getWeaponType);
PREP(getWindDirection);
PREP(goKneeling);

View File

@ -16,6 +16,8 @@
EXPLODE_2_PVT(_this,_unit,_weapon);
if (_weapon = "") exitWith {-1};
[
primaryWeapon _unit,
secondaryWeapon _unit,

View File

@ -6,7 +6,6 @@ PREP(adjustScope);
PREP(canAdjustScope);
PREP(firedEH);
PREP(getOptics);
PREP(getWeaponIndex);
PREP(inventoryCheck);
PREP(showZeroing);

View File

@ -18,7 +18,7 @@ private ["_unit", "_weapons", "_zeroing", "_pitchbankyaw", "_pitch", "_bank", "_
_unit = _this select 0;
_weaponIndex = [_unit, currentWeapon _unit] call FUNC(getWeaponIndex);
_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
_adjustment = _unit getVariable QGVAR(Adjustment);
if (isNil "_adjustment") then {

View File

@ -18,7 +18,7 @@ private ["_unit", "_weaponIndex", "_zeroing", "_optic", "_maxHorizontal", "_maxV
_unit = _this select 0;
_weaponIndex = [_unit, currentWeapon _unit] call FUNC(getWeaponIndex);
_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
if (_weaponIndex < 0) exitWith {false};
_adjustment = _unit getVariable QGVAR(Adjustment);

View File

@ -31,7 +31,7 @@ if !([_unit] call EFUNC(common,isPlayer)) exitWith {};
_weapon = _this select 1;
_projectile = _this select 5;
_weaponIndex = [_unit, currentWeapon _unit] call FUNC(getWeaponIndex);
_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
if (_weaponIndex < 0) exitWith {};
_zeroing = _adjustment select _weaponIndex;

View File

@ -16,7 +16,7 @@ disableSerialization;
private ["_weaponIndex","_adjustment","_layer","_display","_zeroing","_vertical","_horizontal"];
_weaponIndex = [ACE_player, currentWeapon ACE_player] call FUNC(getWeaponIndex);
_weaponIndex = [ACE_player, currentWeapon ACE_player] call EFUNC(common,getWeaponIndex);
if (_weaponIndex < 0) exitWith {};
_adjustment = ACE_player getVariable QGVAR(Adjustment);