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

scenery model smoke source binding, smoke dispersion tweaks, wind simulation tweak

This commit is contained in:
tmj-fstate
2019-08-08 00:48:11 +02:00
parent 69130d54a0
commit c951b1b955
4 changed files with 46 additions and 53 deletions

View File

@@ -195,8 +195,12 @@ world_environment::update_wind() {
m_wind.change_time -= timedelta;
if( m_wind.change_time < 0 ) {
m_wind.change_time = Random( 5, 30 );
m_wind.azimuth_change = Random( -5, 5 );
m_wind.velocity_change = Random( -1, 1 );
if( Random() < 0.2 ) {
// changes in wind direction should be less frequent than changes in wind speed
// TBD, TODO: configuration-driven direction change frequency
m_wind.azimuth_change = Random( -5, 5 );
}
}
// TBD, TODO: wind configuration
m_wind.azimuth = clamp_circular( m_wind.azimuth + m_wind.azimuth_change * timedelta );