Skip to content
Permalink
Browse files

Fix matchmaking_ds bin not being found for gamedata (#1006). (#1028)

  • Loading branch information...
psychonic committed Jun 1, 2019
1 parent cf0a498 commit 14227c04b857fbaf2e86d83f4cb545d0928959a0
Showing with 6 additions and 9 deletions.
  1. +2 −2 core/HalfLife2.cpp
  2. +3 −0 core/HalfLife2.h
  3. +1 −7 core/logic_bridge.cpp
@@ -50,8 +50,8 @@

typedef ICommandLine *(*FakeGetCommandLine)();

#define TIER0_NAME SOURCE_BIN_PREFIX "tier0" SOURCE_BIN_SUFFIX SOURCE_BIN_EXT
#define VSTDLIB_NAME SOURCE_BIN_PREFIX "vstdlib" SOURCE_BIN_SUFFIX SOURCE_BIN_EXT
#define TIER0_NAME FORMAT_SOURCE_BIN_NAME("tier0")
#define VSTDLIB_NAME FORMAT_SOURCE_BIN_NAME("vstdlib")

CHalfLife2 g_HL2;
ConVar *sv_lan = NULL;
@@ -84,6 +84,9 @@ using namespace SourceMod;
#define SOURCE_BIN_EXT ".so"
#endif

#define FORMAT_SOURCE_BIN_NAME(basename) \
(SOURCE_BIN_PREFIX basename SOURCE_BIN_SUFFIX SOURCE_BIN_EXT)

struct DataTableInfo
{
struct SendPropPolicy
@@ -627,13 +627,7 @@ void CoreProviderImpl::InitializeBridge()
this->serverFactory = (void *)g_SMAPI->GetServerFactory(false);
this->listeners = SMGlobalClass::head;

char path[PLATFORM_MAX_PATH];

ke::path::Format(path, sizeof(path),
"%s/bin/" PLATFORM_FOLDER "matchmaking_ds" SOURCE_BIN_SUFFIX SOURCE_BIN_EXT,
g_SMAPI->GetBaseDir());

if (ke::RefPtr<ke::SharedLib> mmlib = ke::SharedLib::Open(path, NULL, 0)) {
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");
}

0 comments on commit 14227c0

Please sign in to comment.
You can’t perform that action at this time.