From f8f9fbc57ad4889a6f4ead17ac6373f03e7405c6 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Mon, 10 Oct 2016 16:45:34 -0400 Subject: [PATCH] Play medic animation when changing clothes Vanilla commit: https://github.com/DayZMod/DayZ/commit/b91c850f5f8d54135d66d767d52f95f0759f0635 --- SQF/dayz_code/actions/player_wearClothes.sqf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SQF/dayz_code/actions/player_wearClothes.sqf b/SQF/dayz_code/actions/player_wearClothes.sqf index dcf5ad20e..6537087e4 100644 --- a/SQF/dayz_code/actions/player_wearClothes.sqf +++ b/SQF/dayz_code/actions/player_wearClothes.sqf @@ -47,6 +47,13 @@ if ( (isClass(_config >> _itemNew)) ) then { _model = getText (configFile >> "CfgSurvival" >> "Skins" >> _item >> "playerModel"); if (_model != _myModel) then { if(([player,_item] call BIS_fnc_invRemove) == 1) then { + //play animation when changing clothes (Prevents out of breath resetting) + player playActionNow "Medic"; + + //wait animation end + waitUntil {getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "disableWeapons") == 1}; + waitUntil {getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "disableWeapons") == 0}; + player addMagazine _itemNew; [dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph; };