Play medic animation when changing clothes

Vanilla commit:

b91c850f5f
This commit is contained in:
ebaydayz
2016-10-10 16:45:34 -04:00
parent 6f9316e496
commit f8f9fbc57a

View File

@@ -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;
};