Adjust for hl2sdk-bms updates.
This commit is contained in:
parent
f42e9ff812
commit
c5a81d7c6f
@ -1233,7 +1233,7 @@ SMFindMapResult CHalfLife2::FindMap(const char *pMapName, char *pFoundMap, size_
|
|||||||
return SMFindMapResult::FuzzyMatch;
|
return SMFindMapResult::FuzzyMatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif SOURCE_ENGINE == SE_TF2
|
#elif SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_BMS
|
||||||
static char szTemp[PLATFORM_MAX_PATH];
|
static char szTemp[PLATFORM_MAX_PATH];
|
||||||
if (pFoundMap == NULL)
|
if (pFoundMap == NULL)
|
||||||
{
|
{
|
||||||
@ -1272,12 +1272,12 @@ bool CHalfLife2::GetMapDisplayName(const char *pMapName, char *pDisplayname, siz
|
|||||||
ke::SafeStrcpy(pDisplayname, nMapNameMax, &lastSlashPos[1]);
|
ke::SafeStrcpy(pDisplayname, nMapNameMax, &lastSlashPos[1]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#elif SOURCE_ENGINE == SE_TF2
|
#elif SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_BMS
|
||||||
char *ugcPos;
|
char *ugcPos;
|
||||||
// In TF2, workshop maps show up as workshop/mapname.ugc123456789 regardless of OS
|
// In TF2 and BMS, workshop maps show up as workshop/mapname.ugc123456789 regardless of OS
|
||||||
if (strncmp(pDisplayname, "workshop/", 9) == 0 && (ugcPos = strstr(pDisplayname, ".ugc")) != NULL)
|
if (strncmp(pDisplayname, "workshop/", 9) == 0 && (ugcPos = strstr(pDisplayname, ".ugc")) != NULL)
|
||||||
{
|
{
|
||||||
// Overwrite the . with a nul and SafeStrcpy will handle the rest
|
// Overwrite the . with a null and SafeStrcpy will handle the rest
|
||||||
ugcPos[0] = '\0';
|
ugcPos[0] = '\0';
|
||||||
ke::SafeStrcpy(pDisplayname, nMapNameMax, &pDisplayname[9]);
|
ke::SafeStrcpy(pDisplayname, nMapNameMax, &pDisplayname[9]);
|
||||||
return true;
|
return true;
|
||||||
|
@ -77,7 +77,7 @@ bool SourceMod_Core::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen
|
|||||||
PLUGIN_SAVEVARS();
|
PLUGIN_SAVEVARS();
|
||||||
|
|
||||||
GET_V_IFACE_ANY(GetServerFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
|
GET_V_IFACE_ANY(GetServerFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
|
||||||
#if SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_SDK2013
|
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_SDK2013
|
||||||
// Shim to avoid hooking shims
|
// Shim to avoid hooking shims
|
||||||
engine = (IVEngineServer *)ismm->GetEngineFactory()("VEngineServer023", nullptr);
|
engine = (IVEngineServer *)ismm->GetEngineFactory()("VEngineServer023", nullptr);
|
||||||
if (!engine)
|
if (!engine)
|
||||||
|
@ -530,7 +530,7 @@ static cell_t smn_TRGetPointContents(IPluginContext *pContext, const cell_t *par
|
|||||||
{
|
{
|
||||||
mask = enginetrace->GetPointContents(pos);
|
mask = enginetrace->GetPointContents(pos);
|
||||||
} else {
|
} else {
|
||||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
#if SOURCE_ENGINE >= SE_LEFT4DEAD || SOURCE_ENGINE == SE_BMS
|
||||||
mask = enginetrace->GetPointContents(pos, MASK_ALL, &hentity);
|
mask = enginetrace->GetPointContents(pos, MASK_ALL, &hentity);
|
||||||
#else
|
#else
|
||||||
mask = enginetrace->GetPointContents(pos, &hentity);
|
mask = enginetrace->GetPointContents(pos, &hentity);
|
||||||
|
@ -340,7 +340,7 @@ bool SDKExtension::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen,
|
|||||||
GET_V_IFACE_CURRENT(engineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
|
GET_V_IFACE_CURRENT(engineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
|
||||||
#else
|
#else
|
||||||
GET_V_IFACE_ANY(GetServerFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
|
GET_V_IFACE_ANY(GetServerFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
|
||||||
#if SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_SDK2013
|
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_SDK2013
|
||||||
// Shim to avoid hooking shims
|
// Shim to avoid hooking shims
|
||||||
engine = (IVEngineServer *) ismm->GetEngineFactory()("VEngineServer023", nullptr);
|
engine = (IVEngineServer *) ismm->GetEngineFactory()("VEngineServer023", nullptr);
|
||||||
if (!engine)
|
if (!engine)
|
||||||
|
Loading…
Reference in New Issue
Block a user