Repository navigation
Conversation
- CBaseServer::GetClient returns a pointer: use SDKType_Address (64-bit Address, result through a by-ref argument) instead of PlainOldData, which truncated it. - The IClient -> CBaseClient adjustment is 8 on x86_64, not 4: read it from gamedata (CBaseClient::IClient). - gamedata: linux64 entries (same symbol and engine vtable indices as linux). - CI: build with SourceMod 1.13.0.7427 (production), the first with 64-bit Address. Checked on CS:S x86 and x86_64 (build 11003710): the computed CBaseClient's vtable is CGameClient's.
Member
Author
|
The plugin is now built with SourceMod 1.13 includes (64-bit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
CBaseServer::GetClientreturns anIClient*throughSDKType_PlainOldData, which is 32-bit, so the pointer gets truncated.GetBaseClient()subtracts 4 to go fromIClientback toCBaseClient(multiple inheritance). On x86_64 it's 8.linux64keys, and SourceMod doesn't fall back tolinux.Changes
GetClientusesSDKType_Address. With SourceMod 1.13Addressis 64-bit and the result comes back through a by-ref argument.IClientadjustment is now read from gamedata (CBaseClient::IClient: 4 on x86/windows/mac, 8 on linux64).linux64entries.@svexists on x86_64, andCBaseServer::GetClient(7) andCGameClient::UpdateAcknowledgedFramecount(44) have the same engine vtable index.setup-sp1.13.7427). That's what production runs, and it's the first version with 64-bitAddress. 1.12 includes can't express this.Testing
On CS:S build 11003710, both x86 and x86_64: a probe redoing
GetBaseClient()on a client checks that the resulting object's vtable isCGameClient's. It is OK on both (offset 4 / 8).