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.
This commit is contained in:
ebayShopper
2017-03-08 13:08:46 -05:00
parent 92b09aa530
commit da34b688d2
4 changed files with 6 additions and 6 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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.

View File

@@ -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; };
};
};