mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-19 22:44:59 +01:00
fix(particles): the smoke of a cold diesel keeps the colour of its template (#413)
bcb9e644 (#109) turned a comparison into an assignment: the smoke of a
vehicle in air at 5 degrees or less, or with its engine under 45 degrees,
got the colour 128,128,128. The emitter colour is on a 0-1 scale, so the
smoke turned pure white, glowing at night, and stayed so once the engine
warmed up. Up to 26.05 the line compared and did nothing; the smoke keeps
the colour of its template again, as it did then.
Co-authored-by: maj00r <maj00r@host>
This commit is contained in:
@@ -168,9 +168,9 @@ smoke_source::update( double const Timedelta, bool const Onlydespawn ) {
|
||||
if( m_ownertype == owner_type::vehicle ) {
|
||||
|
||||
auto const &mover { *m_owner.vehicle->MoverParameters };
|
||||
if( Global.AirTemperature <= 5.f || mover.dizel_heat.Ts < 45.f ) {
|
||||
m_emitter.color = glm::vec3{ 128, 128, 128 };
|
||||
}
|
||||
// NOTE: the smoke keeps the colour of its template, cold engine or not. a grey for a cold engine was once meant
|
||||
// here, but the line compared instead of assigning; made an assignment, it set 128 on the 0-1 scale of the
|
||||
// emitter colour, so the smoke turned pure white, glowing at night, and never changed back
|
||||
// a vehicle taken off the tracks (gone through a portal, or waiting in the pool of the road traffic) puffs no more,
|
||||
// the particles it already let out fade away as usual
|
||||
m_spawncount = (
|
||||
|
||||
Reference in New Issue
Block a user