mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Return player to a standing pose if they were standing before
Made by @Victor-the-Cleaner
This commit is contained in:
@@ -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
|
player playActionNow "PlayerCrouch"; // prevent instant cancel from moving too fast
|
||||||
|
|
||||||
local _isPole = _buildCheck select 1; // bool
|
local _isPole = _buildCheck select 1; // bool
|
||||||
@@ -1405,6 +1407,8 @@ if (_canBuild) then {
|
|||||||
|
|
||||||
if (_proceed) 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
|
local _num_removed = ([player, DZE_buildItem] call BIS_fnc_invRemove); // remove item's magazine from inventory
|
||||||
|
|
||||||
if (_num_removed == 1) then {
|
if (_num_removed == 1) then {
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ s_player_deconstruct = 1;
|
|||||||
s_player_upgrade_build = 1;
|
s_player_upgrade_build = 1;
|
||||||
s_player_maint_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 _objOwnerID = _obj getVariable["ownerPUID","0"];
|
||||||
local _isOwnerOfObj = (_objOwnerID == dayz_playerUID);
|
local _isOwnerOfObj = (_objOwnerID == dayz_playerUID);
|
||||||
local _isDestructable = _obj isKindOf "BuiltItems";
|
local _isDestructable = _obj isKindOf "BuiltItems";
|
||||||
@@ -532,6 +534,7 @@ if (_proceed && _success) then {
|
|||||||
} count _selectedRemoveOutput;
|
} count _selectedRemoveOutput;
|
||||||
|
|
||||||
if (_totalCount > 0) then { // Only reveal refund if there is something there. Random ranges can produce zero results.
|
if (_totalCount > 0) then { // Only reveal refund if there is something there. Random ranges can produce zero results.
|
||||||
|
_sleep = 1;
|
||||||
_item setPosATL _iPos;
|
_item setPosATL _iPos;
|
||||||
player reveal _item;
|
player reveal _item;
|
||||||
|
|
||||||
@@ -544,6 +547,10 @@ if (_proceed && _success) then {
|
|||||||
} else {
|
} else {
|
||||||
localize "str_epoch_player_91" call dayz_rollingMessages; // Failed, object no longer exists.
|
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;
|
dayz_actionInProgress = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user