mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 20:59:19 +02: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)
|
if (m_material > 0)
|
||||||
{
|
{
|
||||||
const opengl_material &mat = GfxRenderer->Material(m_material);
|
const opengl_material &mat = GfxRenderer->Material(m_material);
|
||||||
|
/*
|
||||||
// if material does have opacity set, replace submodel opacity with it
|
// if material does have opacity set, replace submodel opacity with it
|
||||||
if (mat.opacity)
|
if (mat.opacity)
|
||||||
{
|
{
|
||||||
@@ -431,7 +431,7 @@ std::pair<int, int> TSubModel::Load( cParser &parser, bool dynamic )
|
|||||||
else
|
else
|
||||||
iFlags |= 0x10; // opaque
|
iFlags |= 0x10; // opaque
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// and same thing with selfillum
|
// and same thing with selfillum
|
||||||
if (mat.selfillum)
|
if (mat.selfillum)
|
||||||
fLight = *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 )
|
if ( m_material != null_handle )
|
||||||
{
|
{
|
||||||
opengl_material const &mat = GfxRenderer->Material(m_material);
|
opengl_material const &mat = GfxRenderer->Material(m_material);
|
||||||
|
/*
|
||||||
// if material does have opacity set, replace submodel opacity with it
|
// if material does have opacity set, replace submodel opacity with it
|
||||||
if (mat.opacity)
|
if (mat.opacity)
|
||||||
{
|
{
|
||||||
@@ -2065,7 +2065,7 @@ void TSubModel::BinInit(TSubModel *s, float4x4 *m, std::vector<std::string> *t,
|
|||||||
else
|
else
|
||||||
iFlags |= 0x10; // opaque
|
iFlags |= 0x10; // opaque
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// replace submodel selfillum with material one
|
// replace submodel selfillum with material one
|
||||||
if( mat.selfillum ) {
|
if( mat.selfillum ) {
|
||||||
fLight = mat.selfillum.value();
|
fLight = mat.selfillum.value();
|
||||||
|
|||||||
Reference in New Issue
Block a user