From f59cef8056193073a0f8bddc294b32271d94498d Mon Sep 17 00:00:00 2001 From: Steve Zhao Date: Mon, 30 Jun 2025 21:00:46 -0400 Subject: [PATCH] Salute in vehicle --- addons/util/CfgMoves.hpp | 96 +++++++++++++++++++++++++++++++++ addons/util/config.cpp | 1 + addons/util/inputAction.inc.sqf | 6 +++ 3 files changed, 103 insertions(+) create mode 100644 addons/util/CfgMoves.hpp diff --git a/addons/util/CfgMoves.hpp b/addons/util/CfgMoves.hpp new file mode 100644 index 0000000..3ba8acc --- /dev/null +++ b/addons/util/CfgMoves.hpp @@ -0,0 +1,96 @@ +class CfgMovesBasic { + class ManActions { + GVAR(salute) = QGVAR(salute); + }; + + class Actions { + class NoActions: ManActions { + GVAR(salute)[] = {QGVAR(salute), "Gesture"}; + }; + }; +}; + +class CfgGesturesMale { + class Default; + + class BlendAnims { + GVAR(RightArm)[] = { + "RightShoulder", 1, + "RightArm", 1, + "RightArmRoll", 1, + "RightForeArm", 1, + "RightForeArmRoll", 1, + "RightHand", 1, + "RightHandIndex1", 1, + "RightHandIndex2", 1, + "RightHandIndex3", 1, + "RightHandMiddle1", 1, + "RightHandMiddle2", 1, + "RightHandMiddle3", 1, + "RightHandPinky1", 1, + "RightHandMiddle2", 1, + "RightHandMiddle3", 1, + "RightHandPinky1", 1, + "RightHandPinky2", 1, + "RightHandPinky3", 1, + "RightHandRing", 1, + "RightHandRing1", 1, + "RightHandRing2", 1, + "RightHandRing3", 1, + "RightHandThumb1", 1, + "RightHandThumb2", 1, + "RightHandThumb3", 1 + }; + }; + + class States { + class GVAR(Salute): Default { + actions = "NoActions"; + canPullTrigger = 0; + connectAs = ""; + connectFrom[] = {}; + connectTo[] = {}; + disableWeapons = 0; + enableBinocular = 1; + enableMissile = 1; + enableOptics = 0; + equivalentTo = ""; + file = "\a3\anims_f\data\Anim\sdr\mov\erc\stp\ras\pst\AmovPercMstpSrasWpstDnon_Salute.rtm"; + forceAim = 0; + headBobMode = 0; + headBobStrength = 0; + interpolateFrom[] = {}; + interpolateTo[] = {}; + interpolateWith[] = {}; + interpolationRestart = 0; + interpolationSpeed = 6; + looped = 0; + mask = QGVAR(RightArm); + minPlayTime = 0.5; + preload = 0; + ragdoll = 0; + relSpeedMax = 1; + relSpeedMin = 1; + showHandGun = 0; + showItemInHand = 0; + showItemInRightHand = 0; + showWeaponAim = 1; + soundEdge[] = {0.5,1}; + soundEnabled = 1; + soundOverride = ""; + speed = -2; + static = 0; + terminal = 0; + Walkcycles = 1; + weaponIK = 1; + + leftHandIKBeg = 1; + leftHandIKCurve[] = {0, 1, 0.1, 0, 0.8, 0, 1, 1}; + leftHandIKEnd = 1; + + rightHandIKBeg = 1; + rightHandIKCurve[] = {1}; + rightHandIKEnd = 1; + }; + }; +}; diff --git a/addons/util/config.cpp b/addons/util/config.cpp index 2ef3047..a6f77a8 100644 --- a/addons/util/config.cpp +++ b/addons/util/config.cpp @@ -15,3 +15,4 @@ class CfgPatches { // configs go here #include "CfgEventHandlers.hpp" +#include "CfgMoves.hpp" diff --git a/addons/util/inputAction.inc.sqf b/addons/util/inputAction.inc.sqf index 0cd9c7f..755e7a1 100644 --- a/addons/util/inputAction.inc.sqf +++ b/addons/util/inputAction.inc.sqf @@ -1,5 +1,11 @@ // Add more utility for base game inputs https://community.bistudio.com/wiki/inputAction/actions +// Salute in vehicle +addUserActionEventHandler ["Salute", "Activate", { + if (isNull objectParent hct_player) exitWith {}; + hct_player switchGesture ["hct_util_salute", 0, 0]; +}]; + // Deploy Countermeasures from other turret seats addUserActionEventHandler ["launchCM", "Activate", { if ((hct_vehicle unitTurret hct_player) isEqualTo []) exitWith {};