Implement custom paks loading per level

Game will check scripts/levels/mapname.json and load all rpaks in the rpak field.
Game now also unloads pak files loaded by the SDK preventing crashes and unnecessary memory usage.

VPK's and STBSP's are planned to be added as well.
This commit is contained in:
Amos
2022-03-01 02:39:46 +01:00
parent 0509fb0358
commit 6583e174de
18 changed files with 323 additions and 82 deletions

View File

@@ -124,6 +124,7 @@ void Systems_Init()
#if defined (DEDICATED) || defined (GAMEDLL_S3)
CHostState_Attach();
#endif // DEDICATED || GAMEDLL_S3
//CModelLoader_Attach();
CNetChan_Attach();
ConCommand_Attach();
@@ -208,6 +209,7 @@ void Systems_Shutdown()
#if defined (DEDICATED) || defined (GAMEDLL_S3)
CHostState_Detach(); // Dedicated only for now until backwards compatible with S1.
#endif // DEDICATED || GAMEDLL_S3
//CModelLoader_Detach();
CNetChan_Detach();
ConCommand_Detach();