mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-04 07:12:55 +03:00
Fix inconsistent USEC_infected and USEC_BloodQty variable
This commit is contained in:
@@ -50,10 +50,7 @@ while {r_doLoop} do {
|
|||||||
_cureChance = if (_isOwner) then {0.10 + _cureAttempt} else {0.05 + _cureAttempt};
|
_cureChance = if (_isOwner) then {0.10 + _cureAttempt} else {0.05 + _cureAttempt};
|
||||||
if ([_cureChance] call fn_chance) then {
|
if ([_cureChance] call fn_chance) then {
|
||||||
r_player_infected = false;
|
r_player_infected = false;
|
||||||
player setVariable["USEC_infected",false,false];
|
player setVariable["USEC_infected",false,true];
|
||||||
|
|
||||||
PVDZ_serverStoreVar = [player,"USEC_infected",false];
|
|
||||||
publicVariableServer "PVDZ_serverStoreVar";
|
|
||||||
} else {
|
} else {
|
||||||
_infectedStatus = if (r_player_infected) then { "Infected" } else { "Cured" };
|
_infectedStatus = if (r_player_infected) then { "Infected" } else { "Cured" };
|
||||||
_cureAttempt = _cureAttempt + 0.01;
|
_cureAttempt = _cureAttempt + 0.01;
|
||||||
|
|||||||
@@ -4,11 +4,7 @@
|
|||||||
|
|
||||||
sched_medical_slow = { // 10 seconds
|
sched_medical_slow = { // 10 seconds
|
||||||
if (abs (r_player_blood - (player getVariable["USEC_BloodQty", r_player_bloodTotal])) > 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, true]; // Variable is already global, there is no need to switch the system now.
|
||||||
player setVariable["USEC_BloodQty", r_player_blood, false];
|
|
||||||
//Send only to server
|
|
||||||
PVDZ_serverStoreVar = [player, "USEC_BloodQty", r_player_blood];
|
|
||||||
publicVariableServer "PVDZ_serverStoreVar";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
objNull
|
objNull
|
||||||
|
|||||||
Reference in New Issue
Block a user