From 0c60e9ce97bf52f9569dbba641ffca887f65deef Mon Sep 17 00:00:00 2001 From: vbawol Date: Thu, 20 Jun 2013 08:40:56 -0500 Subject: [PATCH] Added reduced bleeding based on stance Also a fix to prevent stop animation while in vehicle. --- dayz_code/compile/player_checkStealth.sqf | 13 ++++++++++--- dayz_code/medical/setup_functions_med.sqf | 11 ++++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/dayz_code/compile/player_checkStealth.sqf b/dayz_code/compile/player_checkStealth.sqf index a10dfa705..a0acdb0df 100644 --- a/dayz_code/compile/player_checkStealth.sqf +++ b/dayz_code/compile/player_checkStealth.sqf @@ -16,13 +16,18 @@ _anim4 = toArray _anim; _anim4 resize 4; _anim4 = toString _anim4; +dayz_isKneeling = false; +dayz_isCrawling = false; + if (["pknl",_anim] call fnc_inString) then { _scaleMvmt = 0.2; //0.1; _scalePose = 0.6; //0.4 -} else {; + dayz_isKneeling = true; +} else { if (["ppne",_anim] call fnc_inString) then { _scaleMvmt = 0.3; _scalePose = 0.14; + dayz_isCrawling = true; }; }; @@ -35,8 +40,10 @@ if (_anim4 == "aswm") then { if(!_isWater) then { // Stops swimming in ground - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; // This sleep was much needed sleep 5; diff --git a/dayz_code/medical/setup_functions_med.sqf b/dayz_code/medical/setup_functions_med.sqf index 3a3a76153..eb97af186 100644 --- a/dayz_code/medical/setup_functions_med.sqf +++ b/dayz_code/medical/setup_functions_med.sqf @@ -136,9 +136,18 @@ fnc_usec_playerBleed = { _bleedPerSec = (r_player_bloodTotal / _bleedTime); _total = r_player_bloodTotal; r_player_injured = true; - _myBleedTime = (random 500) + 100; + _myBleedTime = (random 300) + 30; _bTime = 0; while {r_player_injured} do { + + // If kneeling or crawling reduce bleeding + if(dayz_isKneeling) then { + _bleedPerSec = _bleedPerSec / 2; + }; + if(dayz_isCrawling) then { + _bleedPerSec = _bleedPerSec / 4; + }; + //bleed out if (r_player_blood > 0) then { r_player_blood = r_player_blood - _bleedPerSec;