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

consist heating activation logic tweak, smoke in tunnel clipping through terrain hack/fix, door cab controls logic change

This commit is contained in:
tmj-fstate
2019-08-20 12:45:57 +02:00
parent 07d43956af
commit d9b4b9e32b
3 changed files with 24 additions and 26 deletions

View File

@@ -167,6 +167,11 @@ smoke_source::update( double const Timedelta, bool const Onlydespawn ) {
std::min<float>(
m_spawncount + ( m_spawnrate * Timedelta * Global.SmokeFidelity ),
m_max_particles ) );
// HACK: don't spawn particles in tunnels, to prevent smoke clipping through 'terrain' outside
if( ( m_ownertype == owner_type::vehicle )
&& ( m_owner.vehicle->RaTrackGet()->eEnvironment == e_tunnel ) ) {
m_spawncount = 0.f;
}
// update spawned particles
for( auto particleiterator { std::begin( m_particles ) }; particleiterator != std::end( m_particles ); ++particleiterator ) {