From 80b9a8961a8d99ebacebfcc92801af3ca925364d Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Wed, 20 Jan 2016 12:48:39 -0300 Subject: [PATCH] Improve reload animations --- addons/overheating/config.cpp | 11 +++++++++++ addons/overheating/functions/fnc_swapBarrel.sqf | 4 ++-- .../overheating/functions/fnc_swapBarrelCallback.sqf | 3 +++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/addons/overheating/config.cpp b/addons/overheating/config.cpp index 0e899e1b25..3e8729a6ca 100644 --- a/addons/overheating/config.cpp +++ b/addons/overheating/config.cpp @@ -22,3 +22,14 @@ class CfgPatches { #include "ACE_Settings.hpp" +class CfgGesturesMale { + class States { + class GestureReloadBase; + class GestureMountMuzzle: GestureReloadBase { + speed = 0.3; + }; + class GestureDismountMuzzle: GestureReloadBase { + speed = 0.3; + }; + }; +}; \ No newline at end of file diff --git a/addons/overheating/functions/fnc_swapBarrel.sqf b/addons/overheating/functions/fnc_swapBarrel.sqf index 62b1029180..d35e2c3dd9 100644 --- a/addons/overheating/functions/fnc_swapBarrel.sqf +++ b/addons/overheating/functions/fnc_swapBarrel.sqf @@ -23,7 +23,7 @@ if (stance _player != "PRONE") then { [_player, "amovpknlmstpsraswrfldnon", 1] call EFUNC(common,doAnimation); }; _player playActionNow "GestureDismountMuzzle"; -_player playAction "GestureMountMuzzle"; playSound "ACE_BarrelSwap"; +_player playAction "GestureMountMuzzle"; -[10, [_player, _weapon], {(_this select 0) call FUNC(swapBarrelCallback)}, {}, (localize LSTRING(SwappingBarrel))] call EFUNC(common,progressBar); +[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 2be34a269b..d722e56979 100644 --- a/addons/overheating/functions/fnc_swapBarrelCallback.sqf +++ b/addons/overheating/functions/fnc_swapBarrelCallback.sqf @@ -19,6 +19,9 @@ params ["_player", "_weapon"]; TRACE_2("params",_player,_weapon); +_player playAction "GestureMountMuzzle"; +playSound "ACE_BarrelSwap"; + // don't consume the barrel, but rotate through them. [localize LSTRING(SwappedBarrel), QUOTE(PATHTOF(UI\spare_barrel_ca.paa))] call EFUNC(common,displayTextPicture);