16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 22:59:19 +02:00

shuntfield sound for vehicles with diesel-electric engine, sound positioning support for cab controls, minor AI tweaks and bug fixes

This commit is contained in:
tmj-fstate
2018-06-01 23:23:58 +02:00
parent 89e1f25556
commit 1d0cfdb8b1
4 changed files with 77 additions and 52 deletions

View File

@@ -61,11 +61,18 @@ void TGauge::Init(TSubModel *Submodel, TGaugeType Type, float Scale, float Offse
else // a banan może być z optymalizacją?
Submodel->WillBeAnimated(); // wyłączenie ignowania jedynkowego transformu
// pass submodel location to defined sounds
auto const nulloffset { glm::vec3{} };
auto const offset{ model_offset() };
m_soundfxincrease.offset( offset );
m_soundfxdecrease.offset( offset );
if( m_soundfxincrease.offset() == nulloffset ) {
m_soundfxincrease.offset( offset );
}
if( m_soundfxdecrease.offset() == nulloffset ) {
m_soundfxdecrease.offset( offset );
}
for( auto &soundfxrecord : m_soundfxvalues ) {
soundfxrecord.second.offset( offset );
if( soundfxrecord.second.offset() == nulloffset ) {
soundfxrecord.second.offset( offset );
}
}
};