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

build 191004. static model multiple replacable skins support, retarder state exposed to python scripts, sound source fix

This commit is contained in:
tmj-fstate
2019-10-04 23:50:33 +02:00
parent 5deaa1ebc3
commit c312251580
6 changed files with 91 additions and 98 deletions

View File

@@ -422,28 +422,7 @@ bool TAnimModel::Init(std::string const &asName, std::string const &asReplacable
asText = asReplacableTexture.substr( 1, asReplacableTexture.length() - 1 ); // zapamiętanie tekstu
}
else if( asReplacableTexture != "none" ) {
/*
auto const texturepath { substr_path( asReplacableTexture ) };
if( false == texturepath.empty() ) {
Global.asCurrentTexturePath = texturepath;
}
*/
m_materialdata.replacable_skins[ 1 ] = GfxRenderer.Fetch_Material( asReplacableTexture );
/*
if( false == texturepath.empty() ) {
// z powrotem defaultowa sciezka do tekstur
Global.asCurrentTexturePath = std::string( szTexturePath );
}
*/
}
if( ( m_materialdata.replacable_skins[ 1 ] != null_handle )
&& ( GfxRenderer.Material( m_materialdata.replacable_skins[ 1 ] ).has_alpha ) ) {
// tekstura z kanałem alfa - nie renderować w cyklu nieprzezroczystych
m_materialdata.textures_alpha = 0x31310031;
}
else{
// tekstura nieprzezroczysta - nie renderować w cyklu przezroczystych
m_materialdata.textures_alpha = 0x30300030;
m_materialdata.assign( asReplacableTexture );
}
// TODO: redo the random timer initialization