From 55ed12f8d1eb6887d348be03aee5573d44177ffb Mon Sep 17 00:00:00 2001 From: Michael Sartain Date: Thu, 2 Oct 2014 08:25:55 -0700 Subject: Updated the SDK with the latest code from the TF and HL2 branches. --- mp/src/utils/vbsp/staticprop.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'mp/src/utils/vbsp/staticprop.cpp') 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] ) { -- cgit v1.2.3