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

build 180909. scenario time override, support for random texture sets in .mat files, minor bug fixes

This commit is contained in:
tmj-fstate
2018-09-09 21:25:09 +02:00
parent 397628242c
commit 251a31a705
14 changed files with 107 additions and 93 deletions

View File

@@ -541,6 +541,10 @@ state_serializer::deserialize_time( cParser &Input, scene::scratch_data &Scratch
auto const *localtime = std::localtime( &timenow );
Global.ScenarioTimeOffset = ( ( localtime->tm_hour * 60 + localtime->tm_min ) - ( time.wHour * 60 + time.wMinute ) ) / 60.f;
}
else if( false == std::isnan( Global.ScenarioTimeOverride ) ) {
// scenario time override takes precedence over scenario time offset
Global.ScenarioTimeOffset = ( ( Global.ScenarioTimeOverride * 60 ) - ( time.wHour * 60 + time.wMinute ) ) / 60.f;
}
// remaining sunrise and sunset parameters are no longer used, as they're now calculated dynamically
// anything else left in the section has no defined meaning