mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Non-hardcoded binocular / vector detection
This commit is contained in:
parent
23632281cf
commit
cf9479efab
@ -88,7 +88,7 @@ if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then {
|
|||||||
|
|
||||||
_bulletTraceVisible = false;
|
_bulletTraceVisible = false;
|
||||||
if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then {
|
if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then {
|
||||||
if (currentWeapon ACE_player in ["ACE_Vector", "ACE_VectorDay", "Binocular", "Rangefinder", "Laserdesignator"]) then {
|
if ((currentWeapon ACE_player == binocular ACE_player) && {binocular ACE_player != ""}) then {
|
||||||
_bulletTraceVisible = true;
|
_bulletTraceVisible = true;
|
||||||
} else {
|
} else {
|
||||||
if (currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then {
|
if (currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then {
|
||||||
|
@ -522,7 +522,7 @@ GVAR(menuRun) = true;
|
|||||||
(__dsp displayCtrl __mainText) ctrlSetText "Connecting...";
|
(__dsp displayCtrl __mainText) ctrlSetText "Connecting...";
|
||||||
};
|
};
|
||||||
if (ACE_time - GVAR(busyTimer) > 0.6) then {
|
if (ACE_time - GVAR(busyTimer) > 0.6) then {
|
||||||
if ((ACE_player hasWeapon "ACE_Vector") || {ACE_player hasWeapon "ACE_VectorDay"}) then {
|
if (({_x isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]} count (weapons ACE_player)) > 0) then {
|
||||||
GVAR(displaySelection) = "VECTOR";
|
GVAR(displaySelection) = "VECTOR";
|
||||||
(__dsp displayCtrl __mainText) ctrlSetText "Vector Connected";
|
(__dsp displayCtrl __mainText) ctrlSetText "Vector Connected";
|
||||||
GVAR(vectorConnected) = true;
|
GVAR(vectorConnected) = true;
|
||||||
|
@ -7,7 +7,7 @@ PFH executed while holding a vector key down.
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if (!(currentWeapon ACE_player in ["ACE_Vector", "ACE_VectorDay"])) exitWith {
|
if (!((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"])) exitWith {
|
||||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||||
|
|
||||||
GVAR(currentMode) = "";
|
GVAR(currentMode) = "";
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !((currentWeapon ACE_player in ["ACE_Vector", "ACE_VectorDay"]) && {cameraView == "GUNNER"}) exitWith {false};
|
if !(((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]) && {cameraView == "GUNNER"}) exitWith {false};
|
||||||
|
|
||||||
// prevent holding down
|
// prevent holding down
|
||||||
if (GETGVAR(isDownStateKey1,false)) exitWith {false};
|
if (GETGVAR(isDownStateKey1,false)) exitWith {false};
|
||||||
@ -34,7 +34,7 @@
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !((currentWeapon ACE_player in ["ACE_Vector", "ACE_VectorDay"]) && {cameraView == "GUNNER"}) exitWith {false};
|
if !(((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]) && {cameraView == "GUNNER"}) exitWith {false};
|
||||||
|
|
||||||
// prevent holding down
|
// prevent holding down
|
||||||
if (GETGVAR(isDownStateKey2,false)) exitWith {false};
|
if (GETGVAR(isDownStateKey2,false)) exitWith {false};
|
||||||
|
Loading…
Reference in New Issue
Block a user