-
-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul Address #2226
base: master
Are you sure you want to change the base?
Overhaul Address #2226
Conversation
@@ -88,7 +88,10 @@ enum SDKType | |||
SDKType_Float, /**< Float (any) */ | |||
SDKType_Edict, /**< edict_t (always as pointer) */ | |||
SDKType_String, /**< NULL-terminated string (always as pointer) */ | |||
SDKType_Bool /**< Boolean (any) */ | |||
SDKType_Bool, /**< Boolean (any) */ | |||
#if defined VIRTUAL_ADDRESS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a good idea to have SDKType_VirtualAddress
always in the enum (and not in an ifdef). It'll probably cause problems otherwise if anything is ever added to SDKType
.
Can you also add this: } else if (vc->retinfo->vtype == Valve_VirtualAddress) {
void *addr = (void *)vc->retbuf;
return g_pSM->ToPseudoAddress(addr);
} else { to here sourcemod/extensions/sdktools/vcaller.cpp Lines 532 to 545 in b71d3c0
This would allow things like calling |
Another Address PR!
The idea and implementation is primarily @dvander's, this PR just makes the bridge to SM.
In order to use the new virtual address :
If enabled, plugins need to ensure their SDKCalls are using the new
SDKType_VirtualAddress
, whether they're on 32bits or 64bits. Otherwise the plugin will most definitively crash the server.Marking as draft for now until I can get a few server operators to try this out. Extra natives idea are welcomed !