From da34b688d2f5c0cbd6c1984c6bec67aac9da48bf Mon Sep 17 00:00:00 2001 From: ebayShopper Date: Wed, 8 Mar 2017 13:08:46 -0500 Subject: [PATCH] Fix hunger and thirst "working" hits way too high By default this was multiplying all "Working" hunger and thirst hits by 10 @icomrade because (1 min 0.1) always picks 0.1. For example: dayz_thirst = dayz_thirst + (5 / 0.1) dayz_thirst = dayz_thirst + 50 A config variable isn't really needed for this, since it is only used in one file. It can be easily configured in compiles.sqf which most servers already overwrite anyway. This reverts 62b7c21. --- CHANGE LOG 1.0.6.2.txt | 1 + SQF/dayz_code/compile/player_fired.sqf | 2 +- SQF/dayz_code/configVariables.sqf | 1 - SQF/dayz_code/init/compiles.sqf | 8 ++++---- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGE LOG 1.0.6.2.txt b/CHANGE LOG 1.0.6.2.txt index 8de034404..0610c1992 100644 --- a/CHANGE LOG 1.0.6.2.txt +++ b/CHANGE LOG 1.0.6.2.txt @@ -1,5 +1,6 @@ [NEW] Added a few loot positions for Namalsk and Takistan. @skigoggles [FIXED] Kamaz refuel trucks no longer allow automatic refueling. #1855 @coresync2k @dreamforceinc +[FIXED] Fixed food and drink going down 10x faster from melee and other "working" actions. Removed DZE_NutritionDivisor config var, values can be changed in compiles.sqf. [INFO] See Documents\CHANGE LOG 1.0.6.txt for the full list of 1.0.5.1 --> 1.0.6 changes. \ No newline at end of file diff --git a/SQF/dayz_code/compile/player_fired.sqf b/SQF/dayz_code/compile/player_fired.sqf index 4fe6bef01..0fb158a62 100644 --- a/SQF/dayz_code/compile/player_fired.sqf +++ b/SQF/dayz_code/compile/player_fired.sqf @@ -18,7 +18,7 @@ if (_ammo isKindOf "Melee") exitWith { if (_ammo != "Chainsaw_Swing_Ammo") then { // Added Nutrition-Factor for work //[Type,Blood[Calories,Hunger,Thrist,Temp] - ["Working",0,[0,3,5,0]] call dayz_NutritionSystem; + ["Working",0,[0,1,1,0]] call dayz_NutritionSystem; _unit playActionNow "GestureSwing"; }; _this call player_harvest; // harvest wood check diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf index 92e9ef554..980d39785 100644 --- a/SQF/dayz_code/configVariables.sqf +++ b/SQF/dayz_code/configVariables.sqf @@ -33,7 +33,6 @@ DZE_NoBuildNearDistance = 150; // Distance from blacklisted objects to disallow DZE_GodModeBaseExclude = []; //Array of object class names excluded from the god mode bases feature DZE_salvageLocked = true; //Enable or disable salvaging of locked vehicles, useful for stopping griefing on locked vehicles. DZE_DisabledChannels = [(localize "str_channel_side"),(localize "str_channel_global"),(localize "str_channel_command")]; //List of disabled voice channels. Other channels are: "str_channel_group","str_channel_direct","str_channel_vehicle" -DZE_NutritionDivisor = [1, 1, 1, 1]; //array of DIVISORS that regulate the rate of [calories, thirst, hunger, temperature] use when "working" (keep in mind that temperature raises with actions) - min values 0.1 // Death Messages DZE_DeathMsgChat = "none"; //"none","global","side","system" Display death messages in selected chat channel. diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index e550cdf96..ee7c0715e 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -334,10 +334,10 @@ if (!isDedicated) then { }; case "Working": { - if (_calorieCount > 0) then { dayz_nutrition = dayz_nutrition - (_calorieCount / ((DZE_NutritionDivisor select 0) min 0.1)); }; - if (_thirstCount > 0) then { dayz_thirst = dayz_thirst + (_thirstCount / ((DZE_NutritionDivisor select 1) min 0.1)); }; - if (_hungerCount > 0) then { dayz_hunger = dayz_hunger + (_hungerCount / ((DZE_NutritionDivisor select 2) min 0.1)); }; - if (_tempCount > 0) then { dayz_temperatur = dayz_temperatur + (_tempCount / ((DZE_NutritionDivisor select 3) min 0.1)); }; + if (_calorieCount > 0) then { dayz_nutrition = dayz_nutrition - _calorieCount; }; + if (_thirstCount > 0) then { dayz_thirst = dayz_thirst + _thirstCount; }; + if (_hungerCount > 0) then { dayz_hunger = dayz_hunger + _hungerCount; }; + if (_tempCount > 0) then { dayz_temperatur = dayz_temperatur + _tempCount; }; }; };