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

default vehicle sounds tweak, model error logging tweak

This commit is contained in:
tmj-fstate
2019-11-11 00:01:57 +01:00
parent 02bd968f51
commit 33c3e5354a
2 changed files with 48 additions and 44 deletions

View File

@@ -5718,6 +5718,8 @@ void TDynamicObject::LoadMMediaFile( std::string const &TypeName, std::string co
}
// assign default samples to sound emitters which weren't included in the config file
if( TestFlag( MoverParameters->CategoryFlag, 1 ) ) {
// rail vehicles:
// engine
if( MoverParameters->Power > 0 ) {
if( true == m_powertrainsounds.dsbWejscie_na_bezoporow.empty() ) {
@@ -5764,7 +5766,7 @@ void TDynamicObject::LoadMMediaFile( std::string const &TypeName, std::string co
rscurve.deserialize( "curve.wav", sound_type::single );
rscurve.owner( this );
}
}
if (mdModel)
mdModel->Init(); // obrócenie modelu oraz optymalizacja, również zapisanie binarnego

View File

@@ -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
vertexnormal += facenormals[ adjacenvertextidx / 3 ];
}
/*
else {
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
adjacenvertextidx = SeekFaceNormal(sg, adjacenvertextidx / 3 + 1, sg[faceidx], Vertices[vertexidx].position, Vertices);
}