From 6ded8e4b0049b10857fd68b4720e8eae8e43f1b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaffet?= Date: Sat, 2 Jul 2016 19:46:48 +0200 Subject: [PATCH] 0.9.7.4a CHANGED: You can now enable or disable the night in the "cfgClient.lua" file. FIXED: Disappearance of the body after the death of a player --- .gitignore | 1 + DayZ/configs/cfgClient.lua | 4 +- DayZ/configs/cfgServer.lua | 1 - DayZ/handlers/world/client/night/c_night.lua | 5 ++- DayZ/handlers/world/server/weather.lua | 41 ++------------------ changelog.txt | 8 ++-- 6 files changed, 16 insertions(+), 44 deletions(-) diff --git a/.gitignore b/.gitignore index 085e8ba..f9557b7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ Thumbs.db +*.log \ No newline at end of file diff --git a/DayZ/configs/cfgClient.lua b/DayZ/configs/cfgClient.lua index 37973d0..f3f0a32 100644 --- a/DayZ/configs/cfgClient.lua +++ b/DayZ/configs/cfgClient.lua @@ -11,7 +11,7 @@ -- PING CHECK gameplayVariables["ping"] = 600 -- Checks if ping is over the set amount. DEFAULT: 600 --- DAMAGE +-- PARAMETER gameplayVariables["zombiedamage"] = 650 -- Damage done by zombies - DEFAULT: 650, for consistent damage, remove math.random(400,900) and insert value (EXAMPLE: 1000) gameplayVariables["waterdamage"] = math.random(5500,7100) -- Damage received by a player every 4 seconds when it is under water. DEFAULT: math.random(5500,7100). @@ -26,4 +26,4 @@ gameplayVariables["headshotdamage_zombie"] = 1.5 -- Multiplier for damage on hea gameplayVariables["ambiencesoundvolume"] = 0.8 -- How loud ambience sounds should be. Set to 0 to disable, max is 1.0. - DEFAULT: 0.8 -- PAIN SHAKE LEVEL -gameplayVariables["painshakelevel"] = 150 -- How much should the camera shake when in pain. DEFAULT: 150, value can be from 0 - 255 +gameplayVariables["painshakelevel"] = 150 -- How much should the camera shake when in pain. DEFAULT: 150, value can be from 0 - 255 \ No newline at end of file diff --git a/DayZ/configs/cfgServer.lua b/DayZ/configs/cfgServer.lua index 7dc90b3..7258f67 100644 --- a/DayZ/configs/cfgServer.lua +++ b/DayZ/configs/cfgServer.lua @@ -23,7 +23,6 @@ gameplayVariables["playerzombies"] = 6 -- At what amount of zombies should they gameplayVariables["amountzombies"] = 3 -- How often should the script iterate through zombie spawning (= how many zombies should spawn)? - DEFAULT: 3 gameplayVariables["temperaturewater"] = -0.1 -- Amount of temperature to be lost when in water - DEFAULT: -0.01 gameplayVariables["temperaturesprint"] = 0.005 -- Amount of temperature to be gained when sprinting - DEFAULT: 0.005 -gameplayVariables["enablenight"] = false -- Whether or not the night should be darker - DEFAULT: false - SET TO true to enable - remember you need to set it in editor_client.lua too. gameplayVariables["itemrespawntimer"] = 14400000 -- Number of milliseconds that should elapse before the items will respawn. Note: You can also do math on the number. gameplayVariables["autostartaddons"] = true -- Allow the gamemode to autostart resources with addon_ prefix gameplayVariables["enableprone"] = true --Whether or not prone is enabled for players - DEFAULT: true diff --git a/DayZ/handlers/world/client/night/c_night.lua b/DayZ/handlers/world/client/night/c_night.lua index 6766a30..6a8cca5 100644 --- a/DayZ/handlers/world/client/night/c_night.lua +++ b/DayZ/handlers/world/client/night/c_night.lua @@ -75,8 +75,11 @@ function night_init() end end + if gameplayVariables["enablenight"] == true then + nightTimer = setTimer(night_check, 1000, 0) + end + addEventHandler('onClientHUDRender', root, night_render) - nightTimer = setTimer(night_check, 1000, 0) end function night_check() diff --git a/DayZ/handlers/world/server/weather.lua b/DayZ/handlers/world/server/weather.lua index 2f238e2..326ff10 100644 --- a/DayZ/handlers/world/server/weather.lua +++ b/DayZ/handlers/world/server/weather.lua @@ -134,9 +134,10 @@ if not initializeWeather then end function setTheWeather() -local number = math.random(0,18) -weatherRandomizer = math.random(600000,1800000) + local number = math.random(0,18) + weatherRandomizer = math.random(600000,1800000) setWeatherBlended(number) + if number == 8 then setFarClipDistance(400) elseif number == 9 then @@ -145,38 +146,4 @@ weatherRandomizer = math.random(600000,1800000) setFarClipDistance(900) end end -setTimer(setTheWeather,weatherRandomizer,0) - -function setNight (hour,minutes) - if gameplayVariables["enablenight"] then - if hour == 21 then - setSkyGradient(0, 100/minutes, 196/minutes, 136/minutes, 170/minutes, 212/minutes) - setFarClipDistance(120+(880-minutes*14.6)) - setFogDistance(-150+(250-minutes*4.16)) - elseif hour == 7 then - setSkyGradient( 0, 1.6*minutes, 196*3.26, 136*2.26, 170*2.83, 212*3.53 ) - setFarClipDistance(120+(minutes*14.6)) - setFogDistance(-150+(minutes*4.16)) - elseif hour == 22 or hour == 23 then - setSkyGradient( 0, 0, 0, 0, 0, 0 ) - setFarClipDistance(120) - setFogDistance(-150) - elseif hour >= 0 and hour <= 7 then - setSkyGradient( 0, 0, 0, 0, 0, 0 ) - setFarClipDistance(120) - setFogDistance(-150) - else - setSkyGradient(0, 100, 196, 136, 170, 212) - setFarClipDistance(1000) - setFogDistance(100) - end - end -end - -function setNightTime() - if not true then return end - local hour, minutes = getTime() - setNight (hour,minutes) -end ---setTimer(setNightTime,60000,0) ---setNightTime() +setTimer(setTheWeather,weatherRandomizer,0) \ No newline at end of file diff --git a/changelog.txt b/changelog.txt index 642dcb4..9438964 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,7 +4,7 @@ This changelog lists all changes made to MTA DayZ. It adheres to the following f ## [VERSION] - DATE OF RELEASE (YYYY-MM-DD) ## Please add your change on rollingchangelog.txt. -## [0.9.7a] - DATE OF RELEASE (2016-06-24) +## [0.9.7a] - DATE OF RELEASE (2016-06-24) (Last update : 2016-07-02) ### ADDED: For new features ### ADDED: Addon "Antiglitch" @@ -24,6 +24,7 @@ This changelog lists all changes made to MTA DayZ. It adheres to the following f ### CHANGED: playerThirst and playerHunger calculation every 30 seconds instead of onClientRender ### CHANGED: The night is far less dark ### CHANGED: The timer "night_check" is now set to 1 seconds +### CHANGED: You can now enable or disable the night in the "cfgClient.lua" file. ### DEPRECATED: For once-stable removed in upcoming releases ### REMOVED: For deprecated features removed in the release it's mentioned in ### FIXED: For all bugs @@ -33,8 +34,9 @@ This changelog lists all changes made to MTA DayZ. It adheres to the following f ### FIXED: Ammo bug ### FIXED: Patrol Pack bug ### FIXED: Black & White shader not loading -### FIXED : The player don't get damage if are submerged for along time -### FIXED : "NV Goggles" and "IR Goggles" do not work properly at night +### FIXED: The player don't get damage if are submerged for along time +### FIXED: "NV Goggles" and "IR Goggles" do not work properly at night +### FIXED: Disappearance of the body after the death of a player ### SECURITY: To invite users to upgrade in case of vulnerabilities ### LANGUAGE: Romanian is now available.