mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
Replace max blood constant of 12000 to r_player_bloodTotal
Vanilla commit:
78b608c854
This commit is contained in:
@@ -70,17 +70,17 @@ while {r_doLoop} do {
|
|||||||
if (!r_player_injured && !r_player_infected && !(r_player_Sepsis select 0)) then {
|
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.
|
//Give 53 + random amount of blood every 16 secs if player isn't injured.
|
||||||
if ((diag_tickTime - _timer) >= 16) then {
|
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.
|
//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.
|
_blood = 53 + _randomamount; //Max Possible 153.
|
||||||
};
|
};
|
||||||
|
|
||||||
//Make sure we don't go over the max amount
|
//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;
|
r_player_bloodregen = r_player_bloodregen + _blood;
|
||||||
} else {
|
} else {
|
||||||
r_player_blood = 12000;
|
r_player_blood = r_player_bloodTotal;
|
||||||
};
|
};
|
||||||
|
|
||||||
_timer = diag_tickTime;
|
_timer = diag_tickTime;
|
||||||
|
|||||||
@@ -701,7 +701,7 @@ player_sumMedical = {
|
|||||||
_character getVariable["USEC_inPain",false],
|
_character getVariable["USEC_inPain",false],
|
||||||
_character getVariable["USEC_isCardiac",false],
|
_character getVariable["USEC_isCardiac",false],
|
||||||
_character getVariable["USEC_lowBlood",false],
|
_character getVariable["USEC_lowBlood",false],
|
||||||
_character getVariable["USEC_BloodQty",12000],
|
_character getVariable["USEC_BloodQty",r_player_bloodTotal],
|
||||||
_wounds,
|
_wounds,
|
||||||
[_legs,_arms],
|
[_legs,_arms],
|
||||||
_character getVariable["unconsciousTime",0],
|
_character getVariable["unconsciousTime",0],
|
||||||
|
|||||||
@@ -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];
|
_blood = _unit getVariable ["USEC_BloodQty", 0];
|
||||||
|
|
||||||
//diag_log format["Player Blood %1 - %2, - %3, - %4",_blood,_unit,_medic,(_unit getVariable "USEC_BloodQty")];
|
//diag_log format["Player Blood %1 - %2, - %3, - %4",_blood,_unit,_medic,(_unit getVariable "USEC_BloodQty")];
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ fnc_usec_playerHandleBlood = {
|
|||||||
call fnc_usec_resetWoundPoints;
|
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 {
|
if ((_bloodDiff >= 500) or (_bloodDiff <= -500)) then {
|
||||||
player setVariable["USEC_BloodQty",r_player_blood,true];
|
player setVariable["USEC_BloodQty",r_player_blood,true];
|
||||||
@@ -269,7 +269,7 @@ fnc_usec_playerHandleBlood = {
|
|||||||
r_player_blood = r_player_blood + _bloodPerSec;
|
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 {
|
if ((_bloodDiff >= 500) or (_bloodDiff <= -500)) then {
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ _i = 0;
|
|||||||
_r = 0;
|
_r = 0;
|
||||||
_humanityAwarded = 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 {
|
while {r_doLoop} do {
|
||||||
_animState = animationState player;
|
_animState = animationState player;
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ while {1 == 1} do {
|
|||||||
|
|
||||||
// Regen some blood if player is well fed and resting
|
// Regen some blood if player is well fed and resting
|
||||||
// Attention: regen _result must not trigger the "up" arrow of the blood icon
|
// 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 dayz_thirst < SleepWater and !r_player_injured
|
||||||
and !r_player_infected and !(r_player_Sepsis select 0)
|
and !r_player_infected and !(r_player_Sepsis select 0)
|
||||||
and !r_player_unconscious) then {
|
and !r_player_unconscious) then {
|
||||||
@@ -242,10 +242,10 @@ while {1 == 1} do {
|
|||||||
switch (1==1) do {
|
switch (1==1) do {
|
||||||
case (_result < 0.25) : {}; // not well fed
|
case (_result < 0.25) : {}; // not well fed
|
||||||
case ((toArray(animationState player) select 5) == 112) : { // prone
|
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
|
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
|
default { // moving
|
||||||
};
|
};
|
||||||
@@ -253,8 +253,8 @@ while {1 == 1} do {
|
|||||||
r_player_bloodregen = r_player_bloodregen + _result;
|
r_player_bloodregen = r_player_bloodregen + _result;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (r_player_blood > 12000) then {
|
if (r_player_blood > r_player_bloodTotal) then {
|
||||||
r_player_blood = 12000;
|
r_player_blood = r_player_bloodTotal;
|
||||||
};
|
};
|
||||||
|
|
||||||
//Record low bloow
|
//Record low bloow
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#include "scheduler.hpp"
|
#include "scheduler.hpp"
|
||||||
|
|
||||||
sched_medical_slow = { // 10 seconds
|
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
|
//Do not global send
|
||||||
player setVariable["USEC_BloodQty", r_player_blood, false];
|
player setVariable["USEC_BloodQty", r_player_blood, false];
|
||||||
player setVariable["medForceUpdate", true, false];
|
player setVariable["medForceUpdate", true, false];
|
||||||
@@ -21,7 +21,7 @@ sched_medical = { // 1 second
|
|||||||
private "_unconHdlr";
|
private "_unconHdlr";
|
||||||
_unconHdlr = _this select 0;
|
_unconHdlr = _this select 0;
|
||||||
|
|
||||||
if (r_player_blood == 12000) then {
|
if (r_player_blood == r_player_bloodTotal) then {
|
||||||
r_player_foodstack = 0;
|
r_player_foodstack = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user