mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
scope firedEH cleanup
This commit is contained in:
parent
b80602fbae
commit
253ed6946e
@ -18,25 +18,20 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_adjustment", "_weapon", "_projectile", "_weaponIndex", "_zeroing", "_adjustment"];
|
private ["_unit", "_adjustment", "_projectile", "_weaponIndex", "_zeroing", "_adjustment"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_weapon = _this select 1;
|
|
||||||
_projectile = _this select 6;
|
_projectile = _this select 6;
|
||||||
|
|
||||||
// Exit if the unit doesn't have any adjusment variable
|
if !([_unit] call EFUNC(common,isPlayer)) exitWith {};
|
||||||
|
|
||||||
_adjustment = _unit getVariable [QGVAR(Adjustment), []];
|
_adjustment = _unit getVariable [QGVAR(Adjustment), []];
|
||||||
if (_adjustment isEqualTo []) exitWith {};
|
if (_adjustment isEqualTo []) exitWith {};
|
||||||
|
|
||||||
// Exit if the unit isn't a player
|
|
||||||
if !([_unit] call EFUNC(common,isPlayer)) exitWith {};
|
|
||||||
|
|
||||||
_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
||||||
if (_weaponIndex < 0) exitWith {};
|
if (_weaponIndex < 0) exitWith {};
|
||||||
|
|
||||||
_zeroing = _adjustment select _weaponIndex;
|
_zeroing = _adjustment select _weaponIndex;
|
||||||
|
|
||||||
//Exit if adjusment is zero:
|
|
||||||
if (_zeroing isEqualTo [0,0,0]) exitWith {};
|
if (_zeroing isEqualTo [0,0,0]) exitWith {};
|
||||||
|
|
||||||
// Convert zeroing from mils to degrees
|
// Convert zeroing from mils to degrees
|
||||||
|
Loading…
Reference in New Issue
Block a user