aboutsummaryrefslogtreecommitdiff
path: root/mp/src/utils/vbsp/staticprop.cpp
diff options
context:
space:
mode:
authorMichael Sartain <[email protected]>2014-10-02 08:25:55 -0700
committerMichael Sartain <[email protected]>2014-10-02 08:25:55 -0700
commit55ed12f8d1eb6887d348be03aee5573d44177ffb (patch)
tree3686f7ca78c780cd9a3d367b79a9d9250c1be7c0 /mp/src/utils/vbsp/staticprop.cpp
parent* Added support for Visual C++ 2013 Express to VPC (diff)
downloadsource-sdk-2013-55ed12f8d1eb6887d348be03aee5573d44177ffb.tar.xz
source-sdk-2013-55ed12f8d1eb6887d348be03aee5573d44177ffb.zip
Updated the SDK with the latest code from the TF and HL2 branches.
Diffstat (limited to 'mp/src/utils/vbsp/staticprop.cpp')
-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] )
{