Merge pull request #3804 from acemod/fcsScopesFFV

Fcs scopes ffv
This commit is contained in:
commy2 2016-05-20 15:23:49 +02:00
commit f67b3561e8
7 changed files with 35 additions and 11 deletions

View File

@ -22,6 +22,7 @@ private _min = getNumber (_turretConfig >> QGVAR(MinDistance));
private _max = getNumber (_turretConfig >> QGVAR(MaxDistance));
private _distance = _vehicle getVariable [format ["%1_%2", QGVAR(Distance), _turret], _min];
TRACE_4("",_distance,_delta,_min,_max);
_distance = _distance + _delta;
_distance = _distance min _max;

View File

@ -15,6 +15,7 @@
*/
#include "script_component.hpp"
params ["_vehicle","_turret","_distance","_angleTarget"];
TRACE_4("params",_vehicle,_turret,_distance,_angleTarget);
private _FCSMagazines = [];
private _FCSElevation = [];

View File

@ -8,9 +8,13 @@
* Return Value:
* Boolean <BOOL>
*
* Example:
* [] call ace_fcs_fnc_canUseFCS
*
* Public: No
*/
#include "script_component.hpp"
getNumber ([configFile >> "CfgVehicles" >> typeOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1
&& {cameraView == "GUNNER"} // return
&& {cameraView == "GUNNER"}
&& {!([ACE_player] call CBA_fnc_canUseWeapon)} //Not Turned Out

View File

@ -14,6 +14,7 @@
#include "script_component.hpp"
params ["_vehicle", "_turret", "_distance", ["_showHint", false], ["_playSound", true]];
TRACE_5("params",_vehicle,_turret,_distance,_showHint,_playSound);
private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath);
@ -23,6 +24,8 @@ if (isNil "_distance") then {
getNumber (_turretConfig >> QGVAR(MaxDistance)),
getNumber (_turretConfig >> QGVAR(MinDistance))
] call FUNC(getRange);
} else {
((uiNamespace getVariable ["ACE_dlgRangefinder", displayNull]) displayCtrl 1713151) ctrlSetText ([_distance, 4, 0] call CBA_fnc_formatNumber);
};
// MOVING TARGETS

View File

@ -33,8 +33,10 @@ if (!hasInterface) exitWith {};
["ACE3 Scope Adjustment", QGVAR(AdjustUpMinor), localize LSTRING(AdjustUpMinor),
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
[ACE_player] call FUNC(inventoryCheck);
// Statement
@ -46,8 +48,10 @@ if (!hasInterface) exitWith {};
["ACE3 Scope Adjustment", QGVAR(AdjustDownMinor), localize LSTRING(AdjustDownMinor),
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
[ACE_player] call FUNC(inventoryCheck);
// Statement
@ -59,8 +63,10 @@ if (!hasInterface) exitWith {};
["ACE3 Scope Adjustment", QGVAR(AdjustLeftMinor), localize LSTRING(AdjustLeftMinor),
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
[ACE_player] call FUNC(inventoryCheck);
// Statement
@ -72,8 +78,10 @@ if (!hasInterface) exitWith {};
["ACE3 Scope Adjustment", QGVAR(AdjustRightMinor), localize LSTRING(AdjustRightMinor),
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
[ACE_player] call FUNC(inventoryCheck);
// Statement
@ -85,8 +93,10 @@ if (!hasInterface) exitWith {};
["ACE3 Scope Adjustment", QGVAR(AdjustUpMajor), localize LSTRING(AdjustUpMajor),
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
[ACE_player] call FUNC(inventoryCheck);
// Statement
@ -98,8 +108,10 @@ if (!hasInterface) exitWith {};
["ACE3 Scope Adjustment", QGVAR(AdjustDownMajor), localize LSTRING(AdjustDownMajor),
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
[ACE_player] call FUNC(inventoryCheck);
// Statement
@ -111,8 +123,10 @@ if (!hasInterface) exitWith {};
["ACE3 Scope Adjustment", QGVAR(AdjustLeftMajor), localize LSTRING(AdjustLeftMajor),
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
[ACE_player] call FUNC(inventoryCheck);
// Statement
@ -124,8 +138,10 @@ if (!hasInterface) exitWith {};
["ACE3 Scope Adjustment", QGVAR(AdjustRightMajor), localize LSTRING(AdjustRightMajor),
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
[ACE_player] call FUNC(inventoryCheck);
// Statement

View File

@ -4,6 +4,4 @@ ADDON = false;
#include "XEH_PREP.hpp"
GVAR(fadeScript) = scriptNull;
ADDON = true;

View File

@ -24,6 +24,7 @@ _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
if (_weaponIndex < 0) exitWith {};
_zeroing = _adjustment select _weaponIndex;
TRACE_1("Adjusting With",_zeroing);
if (_zeroing isEqualTo [0, 0, 0]) exitWith {};