From 851615a234c7f86b6dd5e1424b3645b95d4dbc5d Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Wed, 20 Jan 2016 13:44:51 -0300 Subject: [PATCH] Inherit custom gesture classes. --- addons/overheating/config.cpp | 21 ++++++++++++++++--- .../overheating/functions/fnc_swapBarrel.sqf | 3 +-- .../functions/fnc_swapBarrelCallback.sqf | 2 +- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/addons/overheating/config.cpp b/addons/overheating/config.cpp index 3e8729a6ca..c57e55913d 100644 --- a/addons/overheating/config.cpp +++ b/addons/overheating/config.cpp @@ -22,13 +22,28 @@ class CfgPatches { #include "ACE_Settings.hpp" +class CfgMovesBasic { + class ManActions { + GVAR(GestureMountMuzzle) = QGVAR(GestureMountMuzzle); + GVAR(GestureDismountMuzzle) = QGVAR(GestureDismountMuzzle); + }; + + class Actions { + class NoActions: ManActions { + GVAR(GestureMountMuzzle)[] = {QGVAR(GestureMountMuzzle), "Gesture"}; + GVAR(GestureDismountMuzzle)[] = {QGVAR(GestureDismountMuzzle), "Gesture"}; + }; + }; +}; + class CfgGesturesMale { class States { - class GestureReloadBase; - class GestureMountMuzzle: GestureReloadBase { + class GestureMountMuzzle; + class GVAR(GestureMountMuzzle): GestureMountMuzzle { speed = 0.3; }; - class GestureDismountMuzzle: GestureReloadBase { + class GestureDismountMuzzle; + class GVAR(GestureDismountMuzzle): GestureDismountMuzzle { speed = 0.3; }; }; diff --git a/addons/overheating/functions/fnc_swapBarrel.sqf b/addons/overheating/functions/fnc_swapBarrel.sqf index d35e2c3dd9..6e499609d3 100644 --- a/addons/overheating/functions/fnc_swapBarrel.sqf +++ b/addons/overheating/functions/fnc_swapBarrel.sqf @@ -22,8 +22,7 @@ TRACE_2("params",_player,_weapon); if (stance _player != "PRONE") then { [_player, "amovpknlmstpsraswrfldnon", 1] call EFUNC(common,doAnimation); }; -_player playActionNow "GestureDismountMuzzle"; +_player playActionNow QGVAR(GestureDismountMuzzle); playSound "ACE_BarrelSwap"; -_player playAction "GestureMountMuzzle"; [5, [_player, _weapon], {(_this select 0) call FUNC(swapBarrelCallback)}, {}, (localize LSTRING(SwappingBarrel))] call EFUNC(common,progressBar); diff --git a/addons/overheating/functions/fnc_swapBarrelCallback.sqf b/addons/overheating/functions/fnc_swapBarrelCallback.sqf index d722e56979..e471813f2f 100644 --- a/addons/overheating/functions/fnc_swapBarrelCallback.sqf +++ b/addons/overheating/functions/fnc_swapBarrelCallback.sqf @@ -19,7 +19,7 @@ params ["_player", "_weapon"]; TRACE_2("params",_player,_weapon); -_player playAction "GestureMountMuzzle"; +_player playAction QGVAR(GestureMountMuzzle); playSound "ACE_BarrelSwap"; // don't consume the barrel, but rotate through them.