Allow gamedata to use vscript binary (#1826)

This commit is contained in:
Vauff 2022-09-20 03:46:03 -04:00 committed by GitHub
parent 4015f9c1c9
commit 568da23c96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View File

@ -90,6 +90,7 @@ public:
void * engineFactory; void * engineFactory;
void * matchmakingDSFactory; void * matchmakingDSFactory;
void * soundemittersystemFactory; void * soundemittersystemFactory;
void * vscriptFactory;
SMGlobalClass * listeners; SMGlobalClass * listeners;
// ConVar functions. // ConVar functions.

View File

@ -612,6 +612,8 @@ SMCResult CGameConfig::ReadSMC_LeavingSection(const SMCStates *states)
addrInBase = bridge->matchmakingDSFactory; addrInBase = bridge->matchmakingDSFactory;
} else if (strcmp(s_TempSig.library, "soundemittersystem") == 0) { } else if (strcmp(s_TempSig.library, "soundemittersystem") == 0) {
addrInBase = bridge->soundemittersystemFactory; addrInBase = bridge->soundemittersystemFactory;
} else if (strcmp(s_TempSig.library, "vscript") == 0) {
addrInBase = bridge->vscriptFactory;
} }
void *final_addr = NULL; void *final_addr = NULL;
if (addrInBase == NULL) if (addrInBase == NULL)

View File

@ -637,6 +637,10 @@ void CoreProviderImpl::InitializeBridge()
this->soundemittersystemFactory = (void*)Sys_GetFactory(mmlib); this->soundemittersystemFactory = (void*)Sys_GetFactory(mmlib);
} }
if (auto mmlib = ::filesystem->LoadModule("vscript" SOURCE_BIN_SUFFIX)) {
this->vscriptFactory = (void*)Sys_GetFactory(mmlib);
}
logic_init_(this, &logicore); logic_init_(this, &logicore);
// Join logic's SMGlobalClass instances. // Join logic's SMGlobalClass instances.