16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 05:29:18 +02:00

renderer changes, time and environment window

This commit is contained in:
milek7
2019-03-09 14:18:10 +01:00
parent 748e7b1dda
commit 3693c1660e
30 changed files with 299 additions and 93 deletions

View File

@@ -35,7 +35,7 @@ world_environment::toggle_daylight() {
// calculates current season of the year based on set simulation date
void
world_environment::compute_season( int const Yearday ) const {
world_environment::compute_season( int const Yearday ) {
using dayseasonpair = std::pair<int, std::string>;
@@ -59,7 +59,7 @@ world_environment::compute_season( int const Yearday ) const {
// calculates current weather
void
world_environment::compute_weather() const {
world_environment::compute_weather() {
Global.Weather = (
Global.Overcast <= 0.25 ? "clear:" :
@@ -67,6 +67,8 @@ world_environment::compute_weather() const {
( Global.Season != "winter:" ?
"rain:" :
"snow:" ) );
m_precipitation.update_weather();
}
void
@@ -161,7 +163,11 @@ world_environment::update() {
else if( Global.Weather == "snow:" ) {
// reduce friction due to snow
Global.FrictionWeatherFactor = 0.75f;
m_precipitationsound.stop();
}
else {
m_precipitationsound.stop();
}
}
void