mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-28 22:47:28 +01:00
Broadcast radio receiver in the cab
Plays internet radio streams (http, mp3) through a positional emitter in the cab, with analog tuning, inter-station noise and two speaker profiles. Stations are listed in fmradio.txt, cab controls are defined with fmradio entries in the .mmd file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -914,6 +914,18 @@ sound_source::location() const {
|
||||
+ m_owner->VectorFront() * (double)m_offset.z };
|
||||
}
|
||||
|
||||
// returns location-based gain factor of the emitter for the current position of the listener
|
||||
float
|
||||
sound_source::soundproofing_factor() {
|
||||
|
||||
// NOTE: the calculation needs the listener to be assigned to a vehicle or in one of the outside views.
|
||||
// this may not be the case yet when we're called from vehicle update, as the global camera data is refreshed later in the frame
|
||||
if( FreeFlyModeFlag || Global.CabWindowOpen || Global.pCamera.m_owner != nullptr ) {
|
||||
update_soundproofing();
|
||||
}
|
||||
return m_properties.soundproofing;
|
||||
}
|
||||
|
||||
void
|
||||
sound_source::range( float const Range ) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user