Fix wrong matchmaking_ds bin path being used in some instances.
This commit is contained in:
parent
bc09b06166
commit
c316d8fccd
@ -50,26 +50,8 @@
|
|||||||
|
|
||||||
typedef ICommandLine *(*FakeGetCommandLine)();
|
typedef ICommandLine *(*FakeGetCommandLine)();
|
||||||
|
|
||||||
#if defined _WIN32
|
#define TIER0_NAME SOURCE_BIN_PREFIX "tier0" SOURCE_BIN_SUFFIX SOURCE_BIN_EXT
|
||||||
#define TIER0_NAME "tier0.dll"
|
#define VSTDLIB_NAME SOURCE_BIN_PREFIX "vstdlib" SOURCE_BIN_SUFFIX SOURCE_BIN_EXT
|
||||||
#define VSTDLIB_NAME "vstdlib.dll"
|
|
||||||
#elif defined __APPLE__
|
|
||||||
#define TIER0_NAME "libtier0.dylib"
|
|
||||||
#define VSTDLIB_NAME "libvstdlib.dylib"
|
|
||||||
#elif defined __linux__
|
|
||||||
#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 \
|
|
||||||
|| SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_LEFT4DEAD2 || SOURCE_ENGINE == SE_NUCLEARDAWN \
|
|
||||||
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_INSURGENCY || SOURCE_ENGINE == SE_DOI
|
|
||||||
#define TIER0_NAME "libtier0_srv.so"
|
|
||||||
#define VSTDLIB_NAME "libvstdlib_srv.so"
|
|
||||||
#elif SOURCE_ENGINE >= SE_LEFT4DEAD
|
|
||||||
#define TIER0_NAME "libtier0.so"
|
|
||||||
#define VSTDLIB_NAME "libvstdlib.so"
|
|
||||||
#else
|
|
||||||
#define TIER0_NAME "tier0_i486.so"
|
|
||||||
#define VSTDLIB_NAME "vstdlib_i486.so"
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CHalfLife2 g_HL2;
|
CHalfLife2 g_HL2;
|
||||||
ConVar *sv_lan = NULL;
|
ConVar *sv_lan = NULL;
|
||||||
|
@ -60,6 +60,30 @@ using namespace SourceMod;
|
|||||||
#define HUD_PRINTTALK 3
|
#define HUD_PRINTTALK 3
|
||||||
#define HUD_PRINTCENTER 4
|
#define HUD_PRINTCENTER 4
|
||||||
|
|
||||||
|
#if defined _WIN32
|
||||||
|
#define SOURCE_BIN_PREFIX ""
|
||||||
|
#define SOURCE_BIN_SUFFIX ""
|
||||||
|
#define SOURCE_BIN_EXT ".dll"
|
||||||
|
#elif defined __APPLE__
|
||||||
|
#define SOURCE_BIN_PREFIX ""
|
||||||
|
#define SOURCE_BIN_SUFFIX ""
|
||||||
|
#define SOURCE_BIN_EXT ".dylib"
|
||||||
|
#elif defined __linux__
|
||||||
|
#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 \
|
||||||
|
|| SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_LEFT4DEAD2 || SOURCE_ENGINE == SE_NUCLEARDAWN \
|
||||||
|
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_INSURGENCY || SOURCE_ENGINE == SE_DOI
|
||||||
|
#define SOURCE_BIN_PREFIX "lib"
|
||||||
|
#define SOURCE_BIN_SUFFIX "_srv"
|
||||||
|
#elif SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||||
|
#define SOURCE_BIN_PREFIX "lib"
|
||||||
|
#define SOURCE_BIN_SUFFIX ""
|
||||||
|
#else
|
||||||
|
#define SOURCE_BIN_PREFIX ""
|
||||||
|
#define SOURCE_BIN_SUFFIX "_i486"
|
||||||
|
#endif
|
||||||
|
#define SOURCE_BIN_EXT ".so"
|
||||||
|
#endif
|
||||||
|
|
||||||
struct DataTableInfo
|
struct DataTableInfo
|
||||||
{
|
{
|
||||||
struct SendPropPolicy
|
struct SendPropPolicy
|
||||||
|
@ -65,20 +65,7 @@
|
|||||||
#include <bridge/include/IPlayerInfoBridge.h>
|
#include <bridge/include/IPlayerInfoBridge.h>
|
||||||
#include <bridge/include/IFileSystemBridge.h>
|
#include <bridge/include/IFileSystemBridge.h>
|
||||||
|
|
||||||
#if defined _WIN32
|
#define MATCHMAKINGDS_NAME "matchmaking_ds" SOURCE_BIN_SUFFIX SOURCE_BIN_EXT
|
||||||
# define MATCHMAKINGDS_SUFFIX ""
|
|
||||||
# define MATCHMAKINGDS_EXT "dll"
|
|
||||||
#elif defined __APPLE__
|
|
||||||
# define MATCHMAKINGDS_SUFFIX ""
|
|
||||||
# define MATCHMAKINGDS_EXT "dylib"
|
|
||||||
#elif defined __linux__
|
|
||||||
#if SOURCE_ENGINE < SE_LEFT4DEAD2
|
|
||||||
# define MATCHMAKINGDS_SUFFIX "_i486"
|
|
||||||
#else
|
|
||||||
# define MATCHMAKINGDS_SUFFIX ""
|
|
||||||
#endif
|
|
||||||
# define MATCHMAKINGDS_EXT "so"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
sm_logic_t logicore;
|
sm_logic_t logicore;
|
||||||
|
|
||||||
@ -658,10 +645,8 @@ void CoreProviderImpl::InitializeBridge()
|
|||||||
char path[PLATFORM_MAX_PATH];
|
char path[PLATFORM_MAX_PATH];
|
||||||
|
|
||||||
ke::path::Format(path, sizeof(path),
|
ke::path::Format(path, sizeof(path),
|
||||||
"%s/bin/matchmaking_ds%s.%s",
|
"%s/bin/" MATCHMAKINGDS_NAME,
|
||||||
g_SMAPI->GetBaseDir(),
|
g_SMAPI->GetBaseDir());
|
||||||
MATCHMAKINGDS_SUFFIX,
|
|
||||||
MATCHMAKINGDS_EXT);
|
|
||||||
|
|
||||||
if (ke::RefPtr<ke::SharedLib> mmlib = ke::SharedLib::Open(path, NULL, 0)) {
|
if (ke::RefPtr<ke::SharedLib> mmlib = ke::SharedLib::Open(path, NULL, 0)) {
|
||||||
this->matchmakingDSFactory =
|
this->matchmakingDSFactory =
|
||||||
|
Loading…
Reference in New Issue
Block a user