alliedmodders / hl2sdk

Half-Life 2 SDK Mirrors
https://github.com/valvesoftware
341 stars 158 forks source link

S2: Update `IEntityResourceManifestBuilder` interface #173

Closed Wend4r closed 7 months ago

Wend4r commented 8 months ago

Imported from Entity Manager project

GAMMACASE commented 8 months ago

Was the table layout tested on windows as well? Since the unk004 is swapped with BuildResourceManifestForEntity in your case

Wend4r commented 8 months ago

I have works on Windows, using this PR

int iEntityCount = pMyLoading->EntityCount();

const EntitySpawnInfo_t *pEntities = pMyLoading->GetEntities();

for(int i = 0; i < iEntityCount; i++)
{
    g_pGameEntitySystem->BuildResourceManifestForEntity(pEntities[i].m_pEntity->GetClassname(), NULL, s_aEntityManagerProviderAgent.GetMyEntityManifest(), ((EntityManager::CEntitySystemProvider *)g_pGameEntitySystem)->GetKeyValuesMemoryPool());
}
GAMMACASE commented 8 months ago

Did the exact code worked on linux as well? Asking in case this Unk004 function is named BuildResourceManifestForEntity too and thus differs per platform due to different signatures

GAMMACASE commented 8 months ago

Can you give an insight of the latest commit and why you split virtuals with ifdef? and if it's ready for a review as of now?

Wend4r commented 8 months ago

Can you give an insight of the latest commit and why you split virtuals with ifdef?

Looking in binary CEntitySystem on different OS, BuildResourceManifests are placed in reverse order

it's ready for a review as of now?

Yes