aboutsummaryrefslogtreecommitdiff
path: root/mp/src/utils/vbsp
diff options
context:
space:
mode:
Diffstat (limited to 'mp/src/utils/vbsp')
-rw-r--r--mp/src/utils/vbsp/staticprop.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/mp/src/utils/vbsp/staticprop.cpp b/mp/src/utils/vbsp/staticprop.cpp
index b7b9b6cb..3ba6b95a 100644
--- a/mp/src/utils/vbsp/staticprop.cpp
+++ b/mp/src/utils/vbsp/staticprop.cpp
@@ -54,6 +54,8 @@ struct StaticPropBuild_t
float m_flForcedFadeScale;
unsigned short m_nMinDXLevel;
unsigned short m_nMaxDXLevel;
+ int m_LightmapResolutionX;
+ int m_LightmapResolutionY;
};
@@ -516,6 +518,9 @@ static void AddStaticPropToLump( StaticPropBuild_t const& build )
}
}
+ propLump.m_nLightmapResolutionX = build.m_LightmapResolutionX;
+ propLump.m_nLightmapResolutionY = build.m_LightmapResolutionY;
+
// Add the leaves to the leaf lump
for (int j = 0; j < leafList.Size(); ++j)
{
@@ -523,6 +528,7 @@ static void AddStaticPropToLump( StaticPropBuild_t const& build )
insert.m_Leaf = leafList[j];
s_StaticPropLeafLump.AddToTail( insert );
}
+
}
@@ -619,6 +625,18 @@ void EmitStaticProps()
build.m_Flags |= STATIC_PROP_SCREEN_SPACE_FADE;
}
+ if (IntForKey( &entities[i], "generatelightmaps") == 0)
+ {
+ build.m_Flags |= STATIC_PROP_NO_PER_TEXEL_LIGHTING;
+ build.m_LightmapResolutionX = 0;
+ build.m_LightmapResolutionY = 0;
+ }
+ else
+ {
+ build.m_LightmapResolutionX = IntForKey( &entities[i], "lightmapresolutionx" );
+ build.m_LightmapResolutionY = IntForKey( &entities[i], "lightmapresolutiony" );
+ }
+
const char *pKey = ValueForKey( &entities[i], "fadescale" );
if ( pKey && pKey[0] )
{