mirror of
https://github.com/nillerusr/source-engine.git
synced 2025-01-12 16:18:03 +00:00
engine: fix static prop lump version 10 loading
This commit is contained in:
parent
c7056b1aa4
commit
9919f7ee95
@ -387,7 +387,8 @@ IModelLoader *modelloader = ( IModelLoader * )&g_ModelLoader;
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Globals used by the CMapLoadHelper
|
// Globals used by the CMapLoadHelper
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
static dheader_t s_MapHeader;
|
dheader_t s_MapHeader;
|
||||||
|
|
||||||
static FileHandle_t s_MapFileHandle = FILESYSTEM_INVALID_HANDLE;
|
static FileHandle_t s_MapFileHandle = FILESYSTEM_INVALID_HANDLE;
|
||||||
static char s_szLoadName[128];
|
static char s_szLoadName[128];
|
||||||
static char s_szMapName[128];
|
static char s_szMapName[128];
|
||||||
|
@ -60,6 +60,7 @@ ConVar r_staticpropinfo( "r_staticpropinfo", "0" );
|
|||||||
ConVar r_drawmodeldecals( "r_drawmodeldecals", "1" );
|
ConVar r_drawmodeldecals( "r_drawmodeldecals", "1" );
|
||||||
extern ConVar mat_fullbright;
|
extern ConVar mat_fullbright;
|
||||||
static bool g_MakingDevShots = false;
|
static bool g_MakingDevShots = false;
|
||||||
|
extern dheader_t s_MapHeader;
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Index into the fade list
|
// Index into the fade list
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -1382,7 +1383,10 @@ void CStaticPropMgr::UnserializeModels( CUtlBuffer& buf )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 10:
|
case 10:
|
||||||
buf.Get( &lump, sizeof( StaticPropLumpV10_t ) );
|
if( s_MapHeader.version >= 21 )
|
||||||
|
buf.Get( &lump, sizeof( StaticPropLumpV10_21_t ) );
|
||||||
|
else
|
||||||
|
buf.Get( &lump, sizeof( StaticPropLumpV10_t ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
|
@ -271,8 +271,29 @@ struct StaticPropLumpV9_t
|
|||||||
bool m_bDisableX360;
|
bool m_bDisableX360;
|
||||||
};
|
};
|
||||||
|
|
||||||
// version 10
|
|
||||||
struct StaticPropLumpV10_t
|
struct StaticPropLumpV10_t
|
||||||
|
{
|
||||||
|
Vector m_Origin;
|
||||||
|
QAngle m_Angles;
|
||||||
|
unsigned short m_PropType;
|
||||||
|
unsigned short m_FirstLeaf;
|
||||||
|
unsigned short m_LeafCount;
|
||||||
|
unsigned char m_Solid;
|
||||||
|
int m_Skin;
|
||||||
|
float m_FadeMinDist;
|
||||||
|
float m_FadeMaxDist;
|
||||||
|
Vector m_LightingOrigin;
|
||||||
|
float m_flForcedFadeScale;
|
||||||
|
unsigned short m_nMinDXLevel;
|
||||||
|
unsigned short m_nMaxDXLevel;
|
||||||
|
// int m_Lighting; // index into the GAMELUMP_STATIC_PROP_LIGHTING lump
|
||||||
|
unsigned int m_Flags;
|
||||||
|
unsigned short m_nLightmapResolutionX;
|
||||||
|
unsigned short m_nLightmapResolutionY;
|
||||||
|
};
|
||||||
|
|
||||||
|
// version 10
|
||||||
|
struct StaticPropLumpV10_21_t
|
||||||
{
|
{
|
||||||
DECLARE_BYTESWAP_DATADESC();
|
DECLARE_BYTESWAP_DATADESC();
|
||||||
Vector m_Origin;
|
Vector m_Origin;
|
||||||
|
Loading…
Reference in New Issue
Block a user