@@ -1973,39 +1973,18 @@ studiohdr_t *CMDLCache::UnserializeMDL( MDLHandle_t handle, void *pData, int nDa
19731973
19741974 // critical! store a back link to our data
19751975 // this is fetched when re-establishing dependent cached data (vtx/vvd)
1976- #ifndef PLATFORM_64BITS
1977- pStudioHdrIn->SetVirtualModel ( MDLHandleToVirtual ( handle ) );
1978- #endif
1976+ pStudioHdrIn->SetVirtualModel ( MDLHandleToVirtual ( handle ) );
19791977
19801978 MdlCacheMsg ( " MDLCache: Alloc studiohdr %s\n " , GetModelName ( handle ) );
19811979
19821980 // allocate cache space
19831981 MemAlloc_PushAllocDbgInfo ( " Models:StudioHdr" , 0 );
1984- #ifdef PLATFORM_64BITS
1985- studiohdr_t *pHdr = (studiohdr_t *)AllocData ( MDLCACHE_STUDIOHDR, pStudioHdrIn->length + sizeof (studiohdr_shim64_index) );
1986- #else
19871982 studiohdr_t *pHdr = (studiohdr_t *)AllocData ( MDLCACHE_STUDIOHDR, pStudioHdrIn->length );
1988- #endif
19891983 MemAlloc_PopAllocDbgInfo ();
19901984 if ( !pHdr )
19911985 return NULL ;
19921986
1993- #ifdef PLATFORM_64BITS
1994- // MoeMod : fix shim64 index
1995- studiohdr_shim64_index *pHdrIndex = (studiohdr_shim64_index *)(((byte *)pHdr)+ pStudioHdrIn->length );
1996- pHdrIndex->virtualModel = nullptr ;
1997- pHdrIndex->animblockModel = nullptr ;
1998- pHdrIndex->pVertexBase = nullptr ;
1999- pHdrIndex->pIndexBase = nullptr ;
2000- pStudioHdrIn->index_ptr_virtualModel = (byte *)&pHdrIndex->virtualModel - (byte *)pHdr;
2001- pStudioHdrIn->index_ptr_animblockModel = (byte *)&pHdrIndex->animblockModel - (byte *)pHdr;
2002- pStudioHdrIn->index_ptr_pVertexBase = (byte *)&pHdrIndex->pVertexBase - (byte *)pHdr;
2003- pStudioHdrIn->index_ptr_pIndexBase = (byte *)&pHdrIndex->pIndexBase - (byte *)pHdr;
2004- pStudioHdrIn->SetVirtualModel ( MDLHandleToVirtual ( handle ) );
2005- CacheData ( &m_MDLDict[handle]->m_MDLCache , pHdr, pStudioHdrIn->length + sizeof (studiohdr_shim64_index), GetModelName ( handle ), MDLCACHE_STUDIOHDR, MakeCacheID ( handle, MDLCACHE_STUDIOHDR) );
2006- #else
20071987 CacheData ( &m_MDLDict[handle]->m_MDLCache , pHdr, pStudioHdrIn->length , GetModelName ( handle ), MDLCACHE_STUDIOHDR, MakeCacheID ( handle, MDLCACHE_STUDIOHDR) );
2008- #endif
20091988
20101989 if ( mod_lock_mdls_on_load.GetBool () )
20111990 {
@@ -2103,27 +2082,7 @@ bool CMDLCache::ReadMDLFile( MDLHandle_t handle, const char *pMDLFileName, CUtlB
21032082
21042083 // critical! store a back link to our data
21052084 // this is fetched when re-establishing dependent cached data (vtx/vvd)
2106- #if PLATFORM_64BITS
2107- int length = buf.Size ();
2108- {
2109- studiohdr_shim64_index shim;
2110- buf.Put ( &shim, sizeof (shim) );
2111- }
2112- studiohdr_shim64_index *pHdrIndex = (studiohdr_shim64_index *)(((byte *)buf.PeekGet ())+ length);
2113- pStudioHdr = (studiohdr_t *)buf.PeekGet ();
2114-
2115- pHdrIndex->virtualModel = nullptr ;
2116- pHdrIndex->animblockModel = nullptr ;
2117- pHdrIndex->pVertexBase = nullptr ;
2118- pHdrIndex->pIndexBase = nullptr ;
2119- pStudioHdr->index_ptr_virtualModel = (byte *)&pHdrIndex->virtualModel - (byte *)pStudioHdr;
2120- pStudioHdr->index_ptr_animblockModel = (byte *)&pHdrIndex->animblockModel - (byte *)pStudioHdr;
2121- pStudioHdr->index_ptr_pVertexBase = (byte *)&pHdrIndex->pVertexBase - (byte *)pStudioHdr;
2122- pStudioHdr->index_ptr_pIndexBase = (byte *)&pHdrIndex->pIndexBase - (byte *)pStudioHdr;
2123- pStudioHdr->SetVirtualModel ( MDLHandleToVirtual ( handle ) );
2124- #else
2125- pStudioHdr->SetVirtualModel ( MDLHandleToVirtual ( handle ) );
2126- #endif
2085+ pStudioHdr->SetVirtualModel ( MDLHandleToVirtual ( handle ) );
21272086
21282087 // Make sure all dependent files are valid
21292088 if ( !VerifyHeaders ( pStudioHdr ) )
0 commit comments