diff --git a/SQF/dayz_code/actions/modular_build.sqf b/SQF/dayz_code/actions/modular_build.sqf index d86c967b0..21935f474 100644 --- a/SQF/dayz_code/actions/modular_build.sqf +++ b/SQF/dayz_code/actions/modular_build.sqf @@ -75,6 +75,8 @@ if (_canBuild) then { // /////////////////////////////////////////////////////////////////////////////////////////// + local _wasStanding = ["perc", animationState player] call fnc_inString; + player playActionNow "PlayerCrouch"; // prevent instant cancel from moving too fast local _isPole = _buildCheck select 1; // bool @@ -1405,6 +1407,8 @@ if (_canBuild) then { if (_proceed) then { + if (_wasStanding) then {player playActionNow "PlayerStand";}; // once the action has completed, return player to a standing pose if they were standing before the action + local _num_removed = ([player, DZE_buildItem] call BIS_fnc_invRemove); // remove item's magazine from inventory if (_num_removed == 1) then { diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index e398ecad9..b23dc7dca 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -68,6 +68,8 @@ s_player_deconstruct = 1; s_player_upgrade_build = 1; s_player_maint_build = 1; +local _wasStanding = ["perc", animationState player] call fnc_inString; +local _sleep = 0; local _objOwnerID = _obj getVariable["ownerPUID","0"]; local _isOwnerOfObj = (_objOwnerID == dayz_playerUID); local _isDestructable = _obj isKindOf "BuiltItems"; @@ -532,6 +534,7 @@ if (_proceed && _success) then { } count _selectedRemoveOutput; if (_totalCount > 0) then { // Only reveal refund if there is something there. Random ranges can produce zero results. + _sleep = 1; _item setPosATL _iPos; player reveal _item; @@ -544,6 +547,10 @@ if (_proceed && _success) then { } else { localize "str_epoch_player_91" call dayz_rollingMessages; // Failed, object no longer exists. }; + if (_wasStanding) then { + uiSleep _sleep; + player playActionNow "PlayerStand"; // once the action has completed, return player to a standing pose if they were standing before the action + }; }; dayz_actionInProgress = false;