void CVradStaticPropMgr::UnserializeStaticProps() { // Unserialize static props, insert them into the appropriate leaves GameLumpHandle_t handle = GetGameLumpHandle( GAMELUMP_STATIC_PROPS ); int size = GameLumpSize( handle ); if (!size) return; if ( GetGameLumpVersion( handle ) != GAMELUMP_STATIC_PROPS_VERSION ) { Error( "Cannot load the static props... encountered a stale map version. Re-vbsp the map." ); } if ( GetGameLump( handle ) ) { CUtlBuffer buf( GetGameLump(handle), size, CUtlBuffer::READ_ONLY ); UnserializeModelDict( buf ); // Skip the leaf list data int count = buf.GetInt(); buf.SeekGet( CUtlBuffer::SEEK_CURRENT, count * sizeof(StaticPropLeafLump_t) ); UnserializeModels( buf ); } }
//----------------------------------------------------------------------------- // Unserialize static props //----------------------------------------------------------------------------- void CStaticPropMgr::UnserializeStaticProps() { // Unserialize static props, insert them into the appropriate leaves int size = Mod_GameLumpSize( GAMELUMP_STATIC_PROPS ); if (!size) return; CUtlBuffer buf( 0, size ); if (Mod_LoadGameLump( GAMELUMP_STATIC_PROPS, buf.PeekPut(), size )) { UnserializeModelDict( buf ); UnserializeLeafList( buf ); UnserializeModels( buf ); } }
void CVradStaticPropMgr::UnserializeStaticProps() { // Unserialize static props, insert them into the appropriate leaves GameLumpHandle_t handle = GetGameLumpHandle( GAMELUMP_STATIC_PROPS ); int size = GameLumpSize( handle ); if (!size) return; if (GetGameLump( handle )) { CUtlBuffer buf( GetGameLump(handle), size ); UnserializeModelDict( buf ); // Skip the leaf list data int count = buf.GetInt(); buf.SeekGet( CUtlBuffer::SEEK_CURRENT, count * sizeof(StaticPropLeafLump_t) ); UnserializeModels( buf ); } }