mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
do not overwrite submodel opacity with material, which is contrary to all logic and reason, but it seems some horrible hacks expect not to overwrite it
This commit is contained in:
@@ -421,7 +421,7 @@ std::pair<int, int> TSubModel::Load( cParser &parser, bool dynamic )
|
||||
if (m_material > 0)
|
||||
{
|
||||
const opengl_material &mat = GfxRenderer->Material(m_material);
|
||||
|
||||
/*
|
||||
// if material does have opacity set, replace submodel opacity with it
|
||||
if (mat.opacity)
|
||||
{
|
||||
@@ -431,7 +431,7 @@ std::pair<int, int> TSubModel::Load( cParser &parser, bool dynamic )
|
||||
else
|
||||
iFlags |= 0x10; // opaque
|
||||
}
|
||||
|
||||
*/
|
||||
// and same thing with selfillum
|
||||
if (mat.selfillum)
|
||||
fLight = *mat.selfillum;
|
||||
@@ -2055,7 +2055,7 @@ void TSubModel::BinInit(TSubModel *s, float4x4 *m, std::vector<std::string> *t,
|
||||
if ( m_material != null_handle )
|
||||
{
|
||||
opengl_material const &mat = GfxRenderer->Material(m_material);
|
||||
|
||||
/*
|
||||
// if material does have opacity set, replace submodel opacity with it
|
||||
if (mat.opacity)
|
||||
{
|
||||
@@ -2065,7 +2065,7 @@ void TSubModel::BinInit(TSubModel *s, float4x4 *m, std::vector<std::string> *t,
|
||||
else
|
||||
iFlags |= 0x10; // opaque
|
||||
}
|
||||
|
||||
*/
|
||||
// replace submodel selfillum with material one
|
||||
if( mat.selfillum ) {
|
||||
fLight = mat.selfillum.value();
|
||||
|
||||
Reference in New Issue
Block a user