Skip to content

Support CS:S x86_64 - #29

Merged
Rushaway merged 2 commits into
mainfrom
feat/linux64
Oct 28, 2026
Merged

Rushaway merged 2 commits into
mainfrom
feat/linux64

Conversation

@cmer81

@cmer81 cmer81 commented Oct 19, 2026

Copy link
Copy Markdown
Member

Part of moving our ZE server to the CS:S x86_64 build (SourceMod 1.13.0.7427 + srcdslab/sourcemod#9 + srcdslab/metamod-source#4).

Problems on x86_64

  • Detour_SetValue reads ScriptVariant_t::m_pszString with LoadFromAddress(..., NumberType_Int32), which truncates the pointer.
  • gamedata has no linux64 keys.

Changes

  • The string pointer is read with LoadAddressFromAddress. m_type stays at +8: the value union is 8 bytes on both architectures (it has float64/uint64 members, see public/vscript/variant.h). ScriptVariant_t has a user-declared copy constructor, so it's passed by hidden reference and objectptr is right on both.
  • gamedata: linux64 signatures (same symbols as linux).
  • CI: compile with SourceMod 1.13.0.7427 (production, 64-bit Address / LoadAddressFromAddress).

Testing

On CS:S build 11003710, x86 and x86_64, through VScript script Convars.SetValue(...): int (sv_gravity 300), float (sv_airaccelerate 12.5) and string (mp_timelimit "25") values are decoded and filtered the same way on both, and rcon_password is blocked.

@cmer81 cmer81 added x86_64 CS:S x86_64 (64-bit srcds) support requires SM 1.13 Built with SourceMod 1.13 includes; does not load on 1.12 labels Oct 19, 2026
@cmer81

cmer81 commented Oct 19, 2026

Copy link
Copy Markdown
Member Author

The plugin is now built with SourceMod 1.13 includes (64-bit Address). Releases will not load on SourceMod 1.12 servers anymore.

- Read ScriptVariant_t::m_pszString with LoadAddressFromAddress: it was read as
  an Int32, which truncates the pointer on x86_64 (m_type stays at +8, the
  value union is 8 bytes on both).
- gamedata: linux64 signatures (same symbols as linux).
- CI: build with SourceMod 1.13.0.7427 (production) for 64-bit Address.

Checked on CS:S x86 and x86_64 (build 11003710) with VScript Convars.SetValue:
int, float and string values are decoded the same and rcon_password is blocked.
@Rushaway
Rushaway merged commit 3f4d913 into main Oct 28, 2026
6 checks passed
@Rushaway
Rushaway deleted the feat/linux64 branch October 28, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires SM 1.13 Built with SourceMod 1.13 includes; does not load on 1.12 x86_64 CS:S x86_64 (64-bit srcds) support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants