16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 03:09: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

@@ -767,6 +767,12 @@ bool eu07_application::init_network() {
if (!Global.random_seed)
Global.random_seed = std::random_device{}();
Global.random_engine.seed(Global.random_seed);
// TODO: sort out this timezone mess
std::time_t utc_now = std::time(nullptr);
std::time_t local_now = utc_now + (std::mktime(std::localtime(&utc_now)) - std::mktime(std::gmtime(&utc_now)));
Global.starting_timestamp = local_now;
Global.ready_to_load = true;
}