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

Merge branch 'milek-dev' into gfx-work

This commit is contained in:
milek7
2019-01-19 19:51:32 +01:00
8 changed files with 41 additions and 39 deletions

View File

@@ -4450,7 +4450,7 @@ void TDynamicObject::RenderSounds() {
// youBy: dzwiek ostrych lukow i ciasnych zwrotek
if( ( ts.R * ts.R > 1 )
&& ( MoverParameters->Vel > 0 ) ) {
&& ( MoverParameters->Vel > 5.0 ) ) {
// scale volume with curve radius and vehicle speed
volume =
MoverParameters->AccN * MoverParameters->AccN
@@ -4652,11 +4652,6 @@ void TDynamicObject::LoadMMediaFile( std::string const &TypeName, std::string co
mdModel = TModelsManager::GetModel(asModel, true);
if (ReplacableSkin != "none")
{
std::string nowheretexture = TextureTest( "nowhere" ); // na razie prymitywnie
if( false == nowheretexture.empty() ) {
m_materialdata.replacable_skins[ 4 ] = GfxRenderer.Fetch_Material( nowheretexture );
}
if (m_materialdata.multi_textures > 0) {
// jeśli model ma 4 tekstury
// check for the pipe method first
@@ -4695,6 +4690,9 @@ void TDynamicObject::LoadMMediaFile( std::string const &TypeName, std::string co
m_materialdata.replacable_skins[ 1 ] = GfxRenderer.Fetch_Material( ReplacableSkin );
}
// potentially set blank destination texture
DestinationSet( {}, {} );
if( GfxRenderer.Material( m_materialdata.replacable_skins[ 1 ] ).get_or_guess_opacity() == 0.0f ) {
// tekstura -1 z kanałem alfa - nie renderować w cyklu nieprzezroczystych
m_materialdata.textures_alpha = 0x31310031;