mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 17:29:18 +02:00
sound fixes
This commit is contained in:
12
DynObj.cpp
12
DynObj.cpp
@@ -3638,7 +3638,7 @@ void TDynamicObject::RenderSounds()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sConverter->gain(vol).pitch(freq).position(GetPosition());
|
if (sConverter) sConverter->gain(vol).pitch(freq).position(GetPosition());
|
||||||
|
|
||||||
float fincvol;
|
float fincvol;
|
||||||
fincvol = 0;
|
fincvol = 0;
|
||||||
@@ -3867,7 +3867,7 @@ void TDynamicObject::RenderSounds()
|
|||||||
if (eng_frq_act < defrot + 0.1 * dt)
|
if (eng_frq_act < defrot + 0.1 * dt)
|
||||||
eng_frq_act = defrot;
|
eng_frq_act = defrot;
|
||||||
}
|
}
|
||||||
sConverter->gain(eng_vol_act).pitch(eng_frq_act + eng_dfrq).position(GetPosition());
|
if (sConverter) sConverter->gain(eng_vol_act).pitch(eng_frq_act + eng_dfrq).position(GetPosition());
|
||||||
// udawanie turbo: (6.66*(eng_vol-0.85))
|
// udawanie turbo: (6.66*(eng_vol-0.85))
|
||||||
if (eng_turbo > 6.66 * (eng_vol - 0.8) + 0.2 * dt)
|
if (eng_turbo > 6.66 * (eng_vol - 0.8) + 0.2 * dt)
|
||||||
eng_turbo = eng_turbo - 0.2 * dt; // 0.125
|
eng_turbo = eng_turbo - 0.2 * dt; // 0.125
|
||||||
@@ -4916,6 +4916,14 @@ void TDynamicObject::LoadMMediaFile(std::string BaseDir, std::string TypeName,
|
|||||||
} while( ( token != "" )
|
} while( ( token != "" )
|
||||||
&& ( false == Stop_InternalData ) );
|
&& ( false == Stop_InternalData ) );
|
||||||
|
|
||||||
|
if (sConverter && rsSilnik)
|
||||||
|
{
|
||||||
|
sConverter->gain_mul = rsSilnik->gain_mul;
|
||||||
|
sConverter->gain_off = rsSilnik->gain_off;
|
||||||
|
sConverter->pitch_mul = rsSilnik->pitch_mul;
|
||||||
|
sConverter->pitch_off = rsSilnik->pitch_off;
|
||||||
|
}
|
||||||
|
|
||||||
if( !iAnimations ) {
|
if( !iAnimations ) {
|
||||||
// if the animations weren't defined the model is likely to be non-functional. warrants a warning.
|
// if the animations weren't defined the model is likely to be non-functional. warrants a warning.
|
||||||
ErrorLog( "Animations tag is missing from the .mmd file \"" + asFileName + "\"" );
|
ErrorLog( "Animations tag is missing from the .mmd file \"" + asFileName + "\"" );
|
||||||
|
|||||||
Reference in New Issue
Block a user