diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/SQF/dayz_code/configVariables.sqf +++ b/SQF/dayz_code/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/SQF/dayz_code/system/player_spawn_2.sqf b/SQF/dayz_code/system/player_spawn_2.sqf index 40def6640..a0aa8f937 100644 --- a/SQF/dayz_code/system/player_spawn_2.sqf +++ b/SQF/dayz_code/system/player_spawn_2.sqf @@ -212,26 +212,25 @@ while {1 == 1} do { _radTimer = 0; }; - // 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 < r_player_bloodTotal && {(dayz_hunger < SleepFood) && (dayz_thirst < SleepWater) && !r_player_injured && !r_player_infected && !(r_player_Sepsis select 0) && !r_player_unconscious}) then { - _result = (1-(dayz_hunger + dayz_thirst)/(SleepWater + SleepFood)); + if (DZE_enableBloodRegen) then { + // 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 < r_player_bloodTotal && {(dayz_hunger < SleepFood) && (dayz_thirst < SleepWater) && !r_player_injured && !r_player_infected && !(r_player_Sepsis select 0) && !r_player_unconscious}) then { + _result = (1-(dayz_hunger + dayz_thirst)/(SleepWater + SleepFood)); - call { - if (_result < 0.25) exitWith {}; // not well fed - if ((toArray(animationState player) select 5) == 112) exitWith { // prone - _result = _result * (1 + 10 * (r_player_bloodTotal - r_player_blood) / r_player_bloodTotal); - }; - if (speed player < 1) exitWith { // still - _result = _result * (1 + 4 * sqrt((r_player_bloodTotal - r_player_blood) / r_player_bloodTotal)); + call { + if (_result < 0.25) exitWith {}; // not well fed + if ((toArray(animationState player) select 5) == 112) exitWith { // prone + _result = _result * (1 + 10 * (r_player_bloodTotal - r_player_blood) / r_player_bloodTotal); + }; + if (speed player < 1) exitWith { // still + _result = _result * (1 + 4 * sqrt((r_player_bloodTotal - r_player_blood) / r_player_bloodTotal)); + }; }; + r_player_bloodregen = r_player_bloodregen + _result; }; - r_player_bloodregen = r_player_bloodregen + _result; - }; - - if (r_player_blood > r_player_bloodTotal) then { - r_player_blood = r_player_bloodTotal; }; + r_player_blood = r_player_blood min r_player_bloodTotal; //Record low bloow _lowBlood = player getVariable ["USEC_lowBlood", false]; diff --git a/Server Files/MPMissions/DayZ_Epoch_1.Takistan/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_1.Takistan/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_1.Takistan/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_1.Takistan/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_12.isladuala/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_12.isladuala/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_12.isladuala/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_12.isladuala/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_13.Tavi/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_13.Tavi/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_13.Tavi/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_13.Tavi/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_15.namalsk/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_15.namalsk/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_15.namalsk/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_15.namalsk/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_2.Chernarus_Winter/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_2.Chernarus_Winter/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_2.Chernarus_Winter/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_2.Chernarus_Winter/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_21.Caribou/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_21.Caribou/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_21.Caribou/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_21.Caribou/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_22.smd_sahrani_A2/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_23.cmr_ovaron/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_24.Napf/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_24.Napf/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_24.Napf/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_24.Napf/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_25.sauerland/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_25.sauerland/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_25.sauerland/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_25.sauerland/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_26.sauerland_winter/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_26.sauerland_winter/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_26.sauerland_winter/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_26.sauerland_winter/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_27.ruegen/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_27.ruegen/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_27.ruegen/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_27.ruegen/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks diff --git a/Server Files/MPMissions/DayZ_Epoch_7.Lingor/configVariables.sqf b/Server Files/MPMissions/DayZ_Epoch_7.Lingor/configVariables.sqf index 7618b1a6e..1eb7fa57c 100644 --- a/Server Files/MPMissions/DayZ_Epoch_7.Lingor/configVariables.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_7.Lingor/configVariables.sqf @@ -171,6 +171,7 @@ if (!isDedicated) then { timezoneswitch = 0; // Changes murderMenu times with this offset in hours. dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map dayz_paraSpawn = false; // Helo jump spawn + DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)] dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks