mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
remove old 'gestures' reload mutex
This commit is contained in:
parent
6569de5332
commit
be17b72cad
@ -16,9 +16,3 @@ class Extended_PostInit_EventHandlers {
|
|||||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class Extended_DisplayLoad_EventHandlers {
|
|
||||||
class RscDisplayMission {
|
|
||||||
ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
@ -5,7 +5,7 @@ class CfgVehicles {
|
|||||||
class ACE_SelfActions {
|
class ACE_SelfActions {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
displayName = CSTRING(Gestures);
|
displayName = CSTRING(Gestures);
|
||||||
condition = QUOTE((canStand _target) && GVAR(ReloadMutex) && {GVAR(showOnInteractionMenu) == 2});
|
condition = QUOTE((canStand _target) && {GVAR(showOnInteractionMenu) == 2});
|
||||||
statement = "";
|
statement = "";
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 3.5;
|
priority = 3.5;
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
disableSerialization;
|
|
||||||
|
|
||||||
params ["_display"];
|
|
||||||
|
|
||||||
_display displayAddEventHandler ["KeyDown", {
|
|
||||||
if ((_this select 1) in actionKeys "ReloadMagazine") then {
|
|
||||||
if (isNull ACE_player || {!alive ACE_player}) exitWith {false};
|
|
||||||
|
|
||||||
private _weapon = currentWeapon ACE_player;
|
|
||||||
|
|
||||||
if (_weapon != "") then {
|
|
||||||
GVAR(ReloadMutex) = false;
|
|
||||||
|
|
||||||
private _gesture = getText (configfile >> "CfgWeapons" >> _weapon >> "reloadAction");
|
|
||||||
private _isLauncher = _weapon isKindOf ["Launcher", configFile >> "CfgWeapons"];
|
|
||||||
private _config = ["CfgGesturesMale", "CfgMovesMaleSdr"] select _isLauncher;
|
|
||||||
private _duration = getNumber (configfile >> _config >> "States" >> _gesture >> "speed");
|
|
||||||
|
|
||||||
if (_duration != 0) then {
|
|
||||||
_duration = if (_duration < 0) then { abs _duration } else { 1 / _duration };
|
|
||||||
} else {
|
|
||||||
_duration = 3;
|
|
||||||
};
|
|
||||||
|
|
||||||
TRACE_2("Reloading, blocking gestures",_weapon,_duration);
|
|
||||||
[{GVAR(ReloadMutex) = true;}, [], _duration] call CBA_fnc_waitAndExecute;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
false
|
|
||||||
}];
|
|
@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
// reload mutex, you can't play signal while reloading
|
|
||||||
GVAR(ReloadMutex) = true;
|
|
||||||
|
|
||||||
// Add keybinds
|
// Add keybinds
|
||||||
{
|
{
|
||||||
_x params ["_currentName", "_key", ["_vanillaKey", false] ];
|
_x params ["_currentName", "_key", ["_vanillaKey", false] ];
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
TRACE_1("params",_this);
|
TRACE_1("params",_this);
|
||||||
|
|
||||||
if (!GVAR(ReloadMutex)) exitWith {false};
|
if (EGVAR(common,isReloading)) exitWith {false};
|
||||||
if (GVAR(showOnInteractionMenu) == 0) exitWith {false};
|
if (GVAR(showOnInteractionMenu) == 0) exitWith {false};
|
||||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user