diff --git a/SQF/dayz_code/actions/player_sleep.sqf b/SQF/dayz_code/actions/player_sleep.sqf index 7306b1a66..77e2edeb0 100644 --- a/SQF/dayz_code/actions/player_sleep.sqf +++ b/SQF/dayz_code/actions/player_sleep.sqf @@ -70,17 +70,17 @@ while {r_doLoop} do { if (!r_player_injured && !r_player_infected && !(r_player_Sepsis select 0)) then { //Give 53 + random amount of blood every 16 secs if player isn't injured. if ((diag_tickTime - _timer) >= 16) then { - if (r_player_blood < 12000) then { + if (r_player_blood < r_player_bloodTotal) then { //Make the random amount of blood you can gain equal to the percentage of blood you have. - _randomamount = round(random (r_player_blood/12000*100)); + _randomamount = round(random (r_player_blood/r_player_bloodTotal*100)); _blood = 53 + _randomamount; //Max Possible 153. }; //Make sure we don't go over the max amount - if ((r_player_blood - 12000) < _blood) then { + if ((r_player_blood - r_player_bloodTotal) < _blood) then { r_player_bloodregen = r_player_bloodregen + _blood; } else { - r_player_blood = 12000; + r_player_blood = r_player_bloodTotal; }; _timer = diag_tickTime; diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index ec16758ce..e550cdf96 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -701,7 +701,7 @@ player_sumMedical = { _character getVariable["USEC_inPain",false], _character getVariable["USEC_isCardiac",false], _character getVariable["USEC_lowBlood",false], - _character getVariable["USEC_BloodQty",12000], + _character getVariable["USEC_BloodQty",r_player_bloodTotal], _wounds, [_legs,_arms], _character getVariable["unconsciousTime",0], diff --git a/SQF/dayz_code/medical/publicEH/medTransfuse.sqf b/SQF/dayz_code/medical/publicEH/medTransfuse.sqf index 0c9a9379a..6198861de 100644 --- a/SQF/dayz_code/medical/publicEH/medTransfuse.sqf +++ b/SQF/dayz_code/medical/publicEH/medTransfuse.sqf @@ -61,7 +61,7 @@ while {r_doLoop} do { }; }; - //If the players blood is equals too or aboue 12000 stop or if the blood mimic amount reaches 0 end the loop. + //If the players blood is equals too or above r_player_bloodTotal stop or if the blood mimic amount reaches 0 end the loop. _blood = _unit getVariable ["USEC_BloodQty", 0]; //diag_log format["Player Blood %1 - %2, - %3, - %4",_blood,_unit,_medic,(_unit getVariable "USEC_BloodQty")]; diff --git a/SQF/dayz_code/medical/setup_functions_med.sqf b/SQF/dayz_code/medical/setup_functions_med.sqf index 3e3e3d7a2..38fdf91c1 100644 --- a/SQF/dayz_code/medical/setup_functions_med.sqf +++ b/SQF/dayz_code/medical/setup_functions_med.sqf @@ -252,7 +252,7 @@ fnc_usec_playerHandleBlood = { call fnc_usec_resetWoundPoints; }; - _bloodDiff = r_player_blood - (player getVariable["USEC_BloodQty", 12000]); + _bloodDiff = r_player_blood - (player getVariable["USEC_BloodQty", r_player_bloodTotal]); if ((_bloodDiff >= 500) or (_bloodDiff <= -500)) then { player setVariable["USEC_BloodQty",r_player_blood,true]; @@ -269,7 +269,7 @@ fnc_usec_playerHandleBlood = { r_player_blood = r_player_blood + _bloodPerSec; }; - _bloodDiff = r_player_blood - (player getVariable["USEC_BloodQty", 12000]); + _bloodDiff = r_player_blood - (player getVariable["USEC_BloodQty", r_player_bloodTotal]); if ((_bloodDiff >= 500) or (_bloodDiff <= -500)) then { diff --git a/SQF/dayz_code/medical/transfusion.sqf b/SQF/dayz_code/medical/transfusion.sqf index 40cb576d6..d7f3a4f52 100644 --- a/SQF/dayz_code/medical/transfusion.sqf +++ b/SQF/dayz_code/medical/transfusion.sqf @@ -103,7 +103,7 @@ _i = 0; _r = 0; _humanityAwarded = 0; -_bloodAmount = if (!_wholeBag) then { 12000/*Full bloodbag*/ } else { 4000 /*Whole blood only gives 4k*/ }; +_bloodAmount = if (!_wholeBag) then { r_player_bloodTotal/*Full bloodbag*/ } else { 4000 /*Whole blood only gives 4k*/ }; while {r_doLoop} do { _animState = animationState player; diff --git a/SQF/dayz_code/system/player_spawn_2.sqf b/SQF/dayz_code/system/player_spawn_2.sqf index 0df3c2c0d..f6631b885 100644 --- a/SQF/dayz_code/system/player_spawn_2.sqf +++ b/SQF/dayz_code/system/player_spawn_2.sqf @@ -234,7 +234,7 @@ while {1 == 1} do { // Regen some blood if player is well fed and resting // Attention: regen _result must not trigger the "up" arrow of the blood icon - if (r_player_blood < 12000 and dayz_hunger < SleepFood + if (r_player_blood < r_player_bloodTotal and dayz_hunger < SleepFood and dayz_thirst < SleepWater and !r_player_injured and !r_player_infected and !(r_player_Sepsis select 0) and !r_player_unconscious) then { @@ -242,10 +242,10 @@ while {1 == 1} do { switch (1==1) do { case (_result < 0.25) : {}; // not well fed case ((toArray(animationState player) select 5) == 112) : { // prone - _result = _result * (1 + 10 * (12000 - r_player_blood) / 12000); + _result = _result * (1 + 10 * (r_player_bloodTotal - r_player_blood) / r_player_bloodTotal); }; case (speed player < 1) : { // still - _result = _result * (1 + 4 * sqrt((12000 - r_player_blood) / 12000)); + _result = _result * (1 + 4 * sqrt((r_player_bloodTotal - r_player_blood) / r_player_bloodTotal)); }; default { // moving }; @@ -253,8 +253,8 @@ while {1 == 1} do { r_player_bloodregen = r_player_bloodregen + _result; }; - if (r_player_blood > 12000) then { - r_player_blood = 12000; + if (r_player_blood > r_player_bloodTotal) then { + r_player_blood = r_player_bloodTotal; }; //Record low bloow diff --git a/SQF/dayz_code/system/scheduler/sched_medical.sqf b/SQF/dayz_code/system/scheduler/sched_medical.sqf index d192e3336..acf698a4c 100644 --- a/SQF/dayz_code/system/scheduler/sched_medical.sqf +++ b/SQF/dayz_code/system/scheduler/sched_medical.sqf @@ -3,7 +3,7 @@ #include "scheduler.hpp" sched_medical_slow = { // 10 seconds - if (abs (r_player_blood - (player getVariable["USEC_BloodQty", 12000])) > 120) then { + if (abs (r_player_blood - (player getVariable["USEC_BloodQty", r_player_bloodTotal])) > 120) then { //Do not global send player setVariable["USEC_BloodQty", r_player_blood, false]; player setVariable["medForceUpdate", true, false]; @@ -21,7 +21,7 @@ sched_medical = { // 1 second private "_unconHdlr"; _unconHdlr = _this select 0; - if (r_player_blood == 12000) then { + if (r_player_blood == r_player_bloodTotal) then { r_player_foodstack = 0; };