While this function works well with the client indexes we pass in, as its name
suggests, we should essentially be passing player references, not client indexes.
The problem is that SourceMod looks for this player in the entity list, but they
might not be there when connecting, or they might be another client or a bot.
This makes the code unstable and confusing, and it works intermittently.
Steam doesn't care whether the player is in the entity list—it works with the
Steam ID. Using ReferenceToIndex here is fundamentally wrong and causes random
-1 errors, especially during OnClientConnect when the entity may not exist yet.
This commit replaces it with a direct client index lookup, which is correct and
reliable because params[1] is already a client index.
* Update plugins/inc to use transitional syntax
* Add CI job for validating plugins/inc
* ci: work around broken entrypoint in sourcemod-spcomp image
* ci: only compile Pawn plugins against master includes
* ci: restore per-version compile-plugins matrix now that spcomp images are fixed
* ci: reuse sm.branch as the image tag directly
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.
The original function is called already using `SH_CALL`, so always supercede in the hook afterwards to not call it twice.
The forward definition had an extra unused parameter defined.
* Implement SetHTTPRequestRawPostBodyFromFile
* Made sure that retval of fread() matches filesize
* Minor code cleanup
* Moved sm_SetHTTPRequestRawPostBodyFromFile to its appropriate place in the file
* style