Return player to a standing pose if they were standing before

Made by @Victor-the-Cleaner
This commit is contained in:
A Man
2022-04-16 17:07:20 +02:00
parent e034c6efe5
commit da5e29acda
2 changed files with 11 additions and 0 deletions

View File

@@ -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 {