mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-19 13:26:08 +01:00
Merge pull request #269 from MaSzyna-EU07/fix/diesel-smoke-after-ignition
Diesel exhaust smoke only once the engine fires (eu07/maszyna#523)
This commit is contained in:
@@ -34,7 +34,7 @@ double engine_load(TMoverParameters const &Mover) {
|
||||
} // namespace
|
||||
|
||||
float vehicle_spawn_count(TMoverParameters const &Mover, bool const Ontracks, spawn_rate const &Rate, double const Timedelta) {
|
||||
if (false == Ontracks) {
|
||||
if (false == Ontracks || Mover.dizel_FiringCountdown > 0.0) {
|
||||
return 0.f;
|
||||
}
|
||||
// the steady rate of the source, the way a source of the scenery spawns...
|
||||
|
||||
@@ -25,6 +25,7 @@ struct spawn_rate {
|
||||
// number of particles the smoke source of a vehicle has to spawn after Timedelta seconds: the steady rate of the
|
||||
// source, plus a share which grows with the work of its engine. a vehicle taken off the tracks (Ontracks false: 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
|
||||
// an engine the starter turns but which hasn't fired yet (TMoverParameters::dizel_FiringCountdown) lets out no smoke either
|
||||
float vehicle_spawn_count(TMoverParameters const &Mover, bool Ontracks, spawn_rate const &Rate, double Timedelta);
|
||||
|
||||
} // namespace smoke
|
||||
|
||||
Reference in New Issue
Block a user