mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 12:49:18 +02:00
default vehicle sounds tweak, model error logging tweak
This commit is contained in:
90
DynObj.cpp
90
DynObj.cpp
@@ -5718,53 +5718,55 @@ void TDynamicObject::LoadMMediaFile( std::string const &TypeName, std::string co
|
|||||||
}
|
}
|
||||||
|
|
||||||
// assign default samples to sound emitters which weren't included in the config file
|
// assign default samples to sound emitters which weren't included in the config file
|
||||||
// engine
|
if( TestFlag( MoverParameters->CategoryFlag, 1 ) ) {
|
||||||
if( MoverParameters->Power > 0 ) {
|
// rail vehicles:
|
||||||
if( true == m_powertrainsounds.dsbWejscie_na_bezoporow.empty() ) {
|
// engine
|
||||||
|
if( MoverParameters->Power > 0 ) {
|
||||||
|
if( true == m_powertrainsounds.dsbWejscie_na_bezoporow.empty() ) {
|
||||||
|
// hunter-111211: domyslne, gdy brak
|
||||||
|
m_powertrainsounds.dsbWejscie_na_bezoporow.deserialize( "wejscie_na_bezoporow.wav", sound_type::single );
|
||||||
|
m_powertrainsounds.dsbWejscie_na_bezoporow.owner( this );
|
||||||
|
}
|
||||||
|
if( true == m_powertrainsounds.motor_parallel.empty() ) {
|
||||||
|
m_powertrainsounds.motor_parallel.deserialize( "wescie_na_drugi_uklad.wav", sound_type::single );
|
||||||
|
m_powertrainsounds.motor_parallel.owner( this );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// braking sounds
|
||||||
|
if( true == rsUnbrake.empty() ) {
|
||||||
|
rsUnbrake.deserialize( "[1007]estluz.wav", sound_type::single );
|
||||||
|
rsUnbrake.owner( this );
|
||||||
|
}
|
||||||
|
// couplers
|
||||||
|
for( auto &couplersounds : m_couplersounds ) {
|
||||||
|
if( true == couplersounds.dsbCouplerAttach.empty() ) {
|
||||||
|
couplersounds.dsbCouplerAttach.deserialize( "couplerattach.wav", sound_type::single );
|
||||||
|
couplersounds.dsbCouplerAttach.owner( this );
|
||||||
|
}
|
||||||
|
if( true == couplersounds.dsbCouplerDetach.empty() ) {
|
||||||
|
couplersounds.dsbCouplerDetach.deserialize( "couplerdetach.wav", sound_type::single );
|
||||||
|
couplersounds.dsbCouplerDetach.owner( this );
|
||||||
|
}
|
||||||
|
if( true == couplersounds.dsbCouplerStretch.empty() ) {
|
||||||
|
couplersounds.dsbCouplerStretch.deserialize( "en57_couplerstretch.wav", sound_type::single );
|
||||||
|
couplersounds.dsbCouplerStretch.owner( this );
|
||||||
|
}
|
||||||
|
if( true == couplersounds.dsbBufferClamp.empty() ) {
|
||||||
|
couplersounds.dsbBufferClamp.deserialize( "en57_bufferclamp.wav", sound_type::single );
|
||||||
|
couplersounds.dsbBufferClamp.owner( this );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// other sounds
|
||||||
|
if( true == m_wheelflat.empty() ) {
|
||||||
|
m_wheelflat.deserialize( "lomotpodkucia.wav 0.23 0.0", sound_type::single, sound_parameters::frequency );
|
||||||
|
m_wheelflat.owner( this );
|
||||||
|
}
|
||||||
|
if( true == rscurve.empty() ) {
|
||||||
// hunter-111211: domyslne, gdy brak
|
// hunter-111211: domyslne, gdy brak
|
||||||
m_powertrainsounds.dsbWejscie_na_bezoporow.deserialize( "wejscie_na_bezoporow.wav", sound_type::single );
|
rscurve.deserialize( "curve.wav", sound_type::single );
|
||||||
m_powertrainsounds.dsbWejscie_na_bezoporow.owner( this );
|
rscurve.owner( this );
|
||||||
}
|
|
||||||
if( true == m_powertrainsounds.motor_parallel.empty() ) {
|
|
||||||
m_powertrainsounds.motor_parallel.deserialize( "wescie_na_drugi_uklad.wav", sound_type::single );
|
|
||||||
m_powertrainsounds.motor_parallel.owner( this );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// braking sounds
|
|
||||||
if( true == rsUnbrake.empty() ) {
|
|
||||||
rsUnbrake.deserialize( "[1007]estluz.wav", sound_type::single );
|
|
||||||
rsUnbrake.owner( this );
|
|
||||||
}
|
|
||||||
// couplers
|
|
||||||
for( auto &couplersounds : m_couplersounds ) {
|
|
||||||
if( true == couplersounds.dsbCouplerAttach.empty() ) {
|
|
||||||
couplersounds.dsbCouplerAttach.deserialize( "couplerattach.wav", sound_type::single );
|
|
||||||
couplersounds.dsbCouplerAttach.owner( this );
|
|
||||||
}
|
|
||||||
if( true == couplersounds.dsbCouplerDetach.empty() ) {
|
|
||||||
couplersounds.dsbCouplerDetach.deserialize( "couplerdetach.wav", sound_type::single );
|
|
||||||
couplersounds.dsbCouplerDetach.owner( this );
|
|
||||||
}
|
|
||||||
if( true == couplersounds.dsbCouplerStretch.empty() ) {
|
|
||||||
couplersounds.dsbCouplerStretch.deserialize( "en57_couplerstretch.wav", sound_type::single );
|
|
||||||
couplersounds.dsbCouplerStretch.owner( this );
|
|
||||||
}
|
|
||||||
if( true == couplersounds.dsbBufferClamp.empty() ) {
|
|
||||||
couplersounds.dsbBufferClamp.deserialize( "en57_bufferclamp.wav", sound_type::single );
|
|
||||||
couplersounds.dsbBufferClamp.owner( this );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// other sounds
|
|
||||||
if( true == m_wheelflat.empty() ) {
|
|
||||||
m_wheelflat.deserialize( "lomotpodkucia.wav 0.23 0.0", sound_type::single, sound_parameters::frequency );
|
|
||||||
m_wheelflat.owner( this );
|
|
||||||
}
|
|
||||||
if( true == rscurve.empty() ) {
|
|
||||||
// hunter-111211: domyslne, gdy brak
|
|
||||||
rscurve.deserialize( "curve.wav", sound_type::single );
|
|
||||||
rscurve.owner( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (mdModel)
|
if (mdModel)
|
||||||
mdModel->Init(); // obrócenie modelu oraz optymalizacja, również zapisanie binarnego
|
mdModel->Init(); // obrócenie modelu oraz optymalizacja, również zapisanie binarnego
|
||||||
|
|||||||
@@ -612,9 +612,11 @@ int TSubModel::Load( cParser &parser, TModel3d *Model, /*int Pos,*/ bool dynamic
|
|||||||
wsp[ adjacenvertextidx ] = vertexidx; // informacja, że w tym wierzchołku jest już policzony wektor normalny
|
wsp[ adjacenvertextidx ] = vertexidx; // informacja, że w tym wierzchołku jest już policzony wektor normalny
|
||||||
vertexnormal += facenormals[ adjacenvertextidx / 3 ];
|
vertexnormal += facenormals[ adjacenvertextidx / 3 ];
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
else {
|
else {
|
||||||
ErrorLog( "Bad model: opposite normals in the same smoothing group, check sub-model \"" + pName + "\" for two-sided faces and/or scaling", logtype::model );
|
ErrorLog( "Bad model: opposite normals in the same smoothing group, check sub-model \"" + pName + "\" for two-sided faces and/or scaling", logtype::model );
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// i szukanie od kolejnego trójkąta
|
// i szukanie od kolejnego trójkąta
|
||||||
adjacenvertextidx = SeekFaceNormal(sg, adjacenvertextidx / 3 + 1, sg[faceidx], Vertices[vertexidx].position, Vertices);
|
adjacenvertextidx = SeekFaceNormal(sg, adjacenvertextidx / 3 + 1, sg[faceidx], Vertices[vertexidx].position, Vertices);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user