diff --git simfab.cc simfab.cc index 71550dc02..6950e53da 100644 --- simfab.cc +++ simfab.cc @@ -1529,7 +1529,7 @@ DBG_DEBUG("fabrik_t::rdwr()","loading factory '%s'",s); /** * let the chimney smoke, if there is something to produce */ -void fabrik_t::smoke() const +void fabrik_t::smoke() { const smoke_desc_t *rada = desc->get_smoke(); if(rada) { @@ -1540,8 +1540,10 @@ void fabrik_t::smoke() const gr->obj_add(smoke); welt->sync_way_eyecandy.add( smoke ); } + // maybe sound? if( desc->get_sound()!=NO_SOUND && welt->get_ticks()>last_sound_ms+desc->get_sound_interval_ms() ) { + last_sound_ms = welt->get_ticks(); welt->play_sound_area_clipped( get_pos().get_2d(), desc->get_sound(), FACTORY_SOUND ); } } diff --git simfab.h simfab.h index 9f03b3d76..e2cb9efa3 100644 --- simfab.h +++ simfab.h @@ -429,7 +429,7 @@ private: void recalc_factory_status(); // create some smoke on the map - void smoke() const; + void smoke(); // scales the amount of production based on the amount already in storage uint32 scale_output_production(const uint32 product, uint32 menge) const;