Fix BIS gesture keybinds

- From #3635 - FUNC(playSignal) needs "BIgesture" prefix
- Interaction conditions are checked on parent, don't need on every
child
This commit is contained in:
PabstMirror 2016-04-21 13:15:35 -05:00
parent 392012bb4b
commit 4214e31678
2 changed files with 18 additions and 17 deletions

View File

@ -13,98 +13,98 @@ class CfgVehicles {
class GVAR(Advance) { class GVAR(Advance) {
displayName = CSTRING(Advance); displayName = CSTRING(Advance);
condition = QUOTE(canStand _target); condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureAdvance';); statement = QUOTE(_target playActionNow 'gestureAdvance';);
showDisabled = 1; showDisabled = 1;
priority = 1.9; priority = 1.9;
}; };
class GVAR(Go) { class GVAR(Go) {
displayName = CSTRING(Go); displayName = CSTRING(Go);
condition = QUOTE(canStand _target); condition = QUOTE(true);
statement = QUOTE(_target playActionNow ([ARR_2('gestureGo','gestureGoB')] select floor random 2);); statement = QUOTE(_target playActionNow ([ARR_2('gestureGo','gestureGoB')] select floor random 2););
showDisabled = 1; showDisabled = 1;
priority = 1.8; priority = 1.8;
}; };
class GVAR(Follow) { class GVAR(Follow) {
displayName = CSTRING(Follow); displayName = CSTRING(Follow);
condition = QUOTE(canStand _target); condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureFollow';); statement = QUOTE(_target playActionNow 'gestureFollow';);
showDisabled = 1; showDisabled = 1;
priority = 1.7; priority = 1.7;
}; };
class GVAR(Up) { class GVAR(Up) {
displayName = CSTRING(Up); displayName = CSTRING(Up);
condition = QUOTE(canStand _target); condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureUp';); statement = QUOTE(_target playActionNow 'gestureUp';);
showDisabled = 1; showDisabled = 1;
priority = 1.5; priority = 1.5;
}; };
class GVAR(CeaseFire) { class GVAR(CeaseFire) {
displayName = CSTRING(CeaseFire); displayName = CSTRING(CeaseFire);
condition = QUOTE(canStand _target); condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureCeaseFire';); statement = QUOTE(_target playActionNow 'gestureCeaseFire';);
showDisabled = 1; showDisabled = 1;
priority = 1.3; priority = 1.3;
}; };
class GVAR(Stop) { class GVAR(Stop) {
displayName = CSTRING(Stop); displayName = CSTRING(Stop);
condition = QUOTE(canStand _target); condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureFreeze';); // BI animation - is actualls "stop" in all stances but prone statement = QUOTE(_target playActionNow 'gestureFreeze';); // BI animation - is actualls "stop" in all stances but prone
showDisabled = 1; showDisabled = 1;
priority = 1.2; priority = 1.2;
}; };
class GVAR(Forward) { class GVAR(Forward) {
displayName = CSTRING(Forward); displayName = CSTRING(Forward);
condition = QUOTE(canStand _target && GVAR(ReloadMutex)); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(forward)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(forward)) call FUNC(playSignal));
showDisabled = 1; showDisabled = 1;
priority = 1.9; priority = 1.9;
}; };
class GVAR(Regroup) { class GVAR(Regroup) {
displayName = CSTRING(Regroup); displayName = CSTRING(Regroup);
condition = QUOTE(canStand _target && GVAR(ReloadMutex)); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(regroup)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(regroup)) call FUNC(playSignal));
showDisabled = 1; showDisabled = 1;
priority = 1.8; priority = 1.8;
}; };
class GVAR(Freeze) { class GVAR(Freeze) {
displayName = CSTRING(Freeze); displayName = CSTRING(Freeze);
condition = QUOTE(canStand _target && GVAR(ReloadMutex)); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(freeze)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(freeze)) call FUNC(playSignal));
showDisabled = 1; showDisabled = 1;
priority = 1.7; priority = 1.7;
}; };
class GVAR(Cover) { class GVAR(Cover) {
displayName = CSTRING(Cover); displayName = CSTRING(Cover);
condition = QUOTE(canStand _target && GVAR(ReloadMutex)); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(cover)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(cover)) call FUNC(playSignal));
showDisabled = 1; showDisabled = 1;
priority = 1.6; priority = 1.6;
}; };
class GVAR(Point) { class GVAR(Point) {
displayName = CSTRING(Point); displayName = CSTRING(Point);
condition = QUOTE(canStand _target && GVAR(ReloadMutex)); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(point)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(point)) call FUNC(playSignal));
showDisabled = 1; showDisabled = 1;
priority = 1.5; priority = 1.5;
}; };
class GVAR(Engage) { class GVAR(Engage) {
displayName = CSTRING(Engage); displayName = CSTRING(Engage);
condition = QUOTE(canStand _target && GVAR(ReloadMutex)); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(engage)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(engage)) call FUNC(playSignal));
showDisabled = 1; showDisabled = 1;
priority = 1.4; priority = 1.4;
}; };
class GVAR(Hold) { class GVAR(Hold) {
displayName = CSTRING(Hold); displayName = CSTRING(Hold);
condition = QUOTE(canStand _target && GVAR(ReloadMutex)); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(hold)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(hold)) call FUNC(playSignal));
showDisabled = 1; showDisabled = 1;
priority = 1.3; priority = 1.3;
}; };
class GVAR(Warning) { class GVAR(Warning) {
displayName = CSTRING(Warning); displayName = CSTRING(Warning);
condition = QUOTE(canStand _target && GVAR(ReloadMutex)); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(warning)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(warning)) call FUNC(playSignal));
showDisabled = 1; showDisabled = 1;
priority = 1.2; priority = 1.2;

View File

@ -10,9 +10,10 @@ GVAR(ReloadMutex) = true;
_x params ["_currentName", "_key", ["_vanillaKey", false] ]; _x params ["_currentName", "_key", ["_vanillaKey", false] ];
// Don't add "ace_gestures_" prefix to BI gestures // Don't add "ace_gestures_" prefix to BI gestures
private _signalName = _currentName; private _signalName = if (_vanillaKey) then {
if (!_vanillaKey) then { format ["BIgesture%1", _currentName];
_signalName = format [QGVAR(%1), _currentName]; } else {
format [QGVAR(%1), _currentName];
}; };
private _code = compile format [QUOTE('%1' call FUNC(playSignal)), _signalName]; private _code = compile format [QUOTE('%1' call FUNC(playSignal)), _signalName];