18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-19 09:56:01 +01:00

fix(gfx): diesel smoke only once the engine fires, not while the starter turns (eu07/maszyna#523)

The smoke of a diesel came out at full strength the moment its ignition
set Mains and started the spin up, together with the ignition sound, whose
first part is the starter cranking the engine.

The ignition now starts a countdown of the new optional .fiz parameter
SmokeDelay (Engine section of DieselEngine and DieselElectric vehicles,
seconds, default 2.0, 0 restores the old behaviour); the smoke source of
the vehicle spawns nothing until it runs out. Engines already running, or
switched on another way, smoke as before. No SVN data change is needed;
vehicle authors may tune SmokeDelay to the cranking part of their
ignition: sample.
This commit is contained in:
jerrrrycho
2026-11-07 18:22:42 +01:00
parent 939e42b611
commit d8f3875929
5 changed files with 81 additions and 1 deletions

View File

@@ -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...