diff --git dataobj/crossing_logic.cc dataobj/crossing_logic.cc index 6cc862431..583e0de2c 100644 --- dataobj/crossing_logic.cc +++ dataobj/crossing_logic.cc @@ -154,12 +154,12 @@ void crossing_logic_t::release_crossing( const vehicle_base_t *v ) // change state; mark dirty and plays sound void crossing_logic_t::set_state( crossing_state_t new_state ) { - // play sound (if there and closing) - if(new_state==CROSSING_CLOSED && desc->get_sound()>=0 && !welt->is_fast_forward()) { - welt->play_sound_area_clipped(crossings[0]->get_pos().get_2d(), desc->get_sound(), CROSSING_SOUND ); - } - if(new_state!=state) { + // play sound (if there and closing) + if(new_state==CROSSING_CLOSED && desc->get_sound()>=0 && !welt->is_fast_forward()) { + welt->play_sound_area_clipped(crossings[0]->get_pos().get_2d(), desc->get_sound(), CROSSING_SOUND ); + } + state = new_state; FOR(minivec_tpl, const i, crossings) { i->state_changed();