Modernize build/CI, support SourceMod 1.13, deprecate ForceHeartbeat

Rework the build and CI: swap to SourceMod's safetyhook-based CDetour and
drop the vendored CDetour/asm sources, the old Makefile, Travis config, and
buildbot perl scripts. Add GitHub Actions building and releasing x86 and
x86_64 against SM 1.12 and 1.13, plus dependabot. Split the Windows and Linux
packages and tidy naming.

Gate IPluginManager::FindPluginByContext on the extension API version so the
extension builds against both SM 1.12 (API 8) and 1.13 (API 9), and shim
DETOUR_CREATE_STATIC_FIXED over the address overload safetyhook exposes.

Deprecate SteamWorks_ForceHeartbeat: newer Steamworks SDKs removed
ISteamGameServer::ForceHeartbeat, so make the native a no-op and mark it
deprecated in the include.
This commit is contained in:
Nicholas Hastings
2026-07-12 10:56:36 -04:00
parent f0c1b62dff
commit 39fcfa564e
21 changed files with 332 additions and 1842 deletions
+11 -2
View File
@@ -20,6 +20,15 @@
#include <cstdio>
/* SourceMod 1.13 (extension API 9) changed IPluginManager::FindPluginByContext()
to take an IPluginContext* directly; older SM (API 8) takes the low-level
sp_context_t* from IPluginContext::GetContext(). */
#if SMINTERFACE_EXTENSIONAPI_VERSION >= 9
#define SW_PLUGIN_CTX(ctx) (ctx)
#else
#define SW_PLUGIN_CTX(ctx) ((ctx)->GetContext())
#endif
static ISteamHTTP *GetHTTPPointer(void)
{
return g_SteamWorks.pSWGameServer->GetHTTP();
@@ -220,7 +229,7 @@ static cell_t sm_SetCallbacks(IPluginContext *pContext, const cell_t *params)
IPlugin *pPlugin;
if (params[5] == BAD_HANDLE)
{
pPlugin = plsys->FindPluginByContext(pContext->GetContext());
pPlugin = plsys->FindPluginByContext(SW_PLUGIN_CTX(pContext));
} else {
HandleError err;
pPlugin = plsys->PluginFromHandle(params[5], &err);
@@ -518,7 +527,7 @@ static cell_t sm_GetHTTPResponseBodyCallback(IPluginContext *pContext, const cel
IPlugin *pPlugin;
if (params[4] == BAD_HANDLE)
{
pPlugin = plsys->FindPluginByContext(pContext->GetContext());
pPlugin = plsys->FindPluginByContext(SW_PLUGIN_CTX(pContext));
} else {
HandleError err;
pPlugin = plsys->PluginFromHandle(params[4], &err);