Fix matchmaking_ds for gamedata (#1504)

* Fix matchmaking_ds for gamedata

* Update logic_bridge.cpp

* More corrected search for matchmaking_ds

* Fix compile error

* Better method for find matchmaking_ds

Code by psychonic https://github.com/alliedmodders/sourcemod/pull/1504#issuecomment-867310412
This commit is contained in:
Accelerator 2021-06-24 19:00:59 +05:00 committed by GitHub
parent 1eae765dc3
commit 2778b132f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -630,11 +630,10 @@ void CoreProviderImpl::InitializeBridge()
this->serverFactory = (void *)g_SMAPI->GetServerFactory(false);
this->listeners = SMGlobalClass::head;
if (ke::RefPtr<ke::SharedLib> mmlib = ke::SharedLib::Open(FORMAT_SOURCE_BIN_NAME("matchmaking_ds"), NULL, 0)) {
this->matchmakingDSFactory =
mmlib->get<decltype(sCoreProviderImpl.matchmakingDSFactory)>("CreateInterface");
if (auto mmlib = ::filesystem->LoadModule("matchmaking_ds" SOURCE_BIN_SUFFIX, "GAMEBIN")) {
this->matchmakingDSFactory = (void*)Sys_GetFactory(mmlib);
}
logic_init_(this, &logicore);
// Join logic's SMGlobalClass instances.