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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user