mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 01:59:19 +02:00
vehicle visualization config file parameters, vehicle attachments support, axle clatter fix, disabled vehicles smoke fix
This commit is contained in:
@@ -167,10 +167,16 @@ 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 ) ) {
|
||||
// consider special spawn rate cases
|
||||
if( m_ownertype == owner_type::vehicle ) {
|
||||
// HACK: don't spawn particles in tunnels, to prevent smoke clipping through 'terrain' outside
|
||||
if( m_owner.vehicle->RaTrackGet()->eEnvironment == e_tunnel ) {
|
||||
m_spawncount = 0.f;
|
||||
}
|
||||
if( false == m_owner.vehicle->bEnabled ) {
|
||||
// don't spawn particles for vehicles which left the scenario
|
||||
m_spawncount = 0.f;
|
||||
}
|
||||
}
|
||||
// update spawned particles
|
||||
for( auto particleiterator { std::begin( m_particles ) }; particleiterator != std::end( m_particles ); ++particleiterator ) {
|
||||
|
||||
Reference in New Issue
Block a user