From fc9960410841f3948878a21c7445c2a422e63906 Mon Sep 17 00:00:00 2001 From: icomrade Date: Sat, 21 Jan 2017 22:41:09 -0500 Subject: [PATCH] Better anim reset in player_death --- SQF/dayz_code/compile/player_death.sqf | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/SQF/dayz_code/compile/player_death.sqf b/SQF/dayz_code/compile/player_death.sqf index 5e716f931..385e4b0b5 100644 --- a/SQF/dayz_code/compile/player_death.sqf +++ b/SQF/dayz_code/compile/player_death.sqf @@ -103,12 +103,6 @@ if (!local _source && isPlayer _source) then { r_player_unconscious = false; r_player_cardiac = false; dayz_autoRun = false; - if (player == vehicle player) then { //fix running corpses - [nil, player, rSWITCHMOVE, ""] call RE; - player SWITCHMOVE ""; - PVDZ_plr_SwitchMove = [player,""]; - publicVariableServer "PVDZ_plr_SwitchMove"; - }; terminate dayz_musicH; terminate dayz_slowCheck; @@ -145,6 +139,16 @@ if (!local _source && isPlayer _source) then { playMusic "dayz_track_death_1"; uiSleep 2; + _animState = toLower (AnimationState _body); + _animStateArray = toArray _animState; + _animCheck = toString ([(_animStateArray select 0),(_animStateArray select 1),(_animStateArray select 2),(_animStateArray select 3)]); + if ((_body == (vehicle _body)) && {_animState != "deadstate" && {_animCheck != "adth"}}) then { //fix running corpses - death anims begin with Adth + [nil, _body, rSWITCHMOVE, ""] call RE; + _body SWITCHMOVE ""; + PVDZ_plr_SwitchMove = [_body,""]; + publicVariableServer "PVDZ_plr_SwitchMove"; + }; + for "_x" from 5 to 1 step -1 do { titleText [format[localize "str_return_lobby", _x], "PLAIN DOWN", 1]; uiSleep 1;