Handle Valve_VirtualAddress SDKCall returns

This commit is contained in:
Headline 2025-09-20 01:31:26 -07:00
parent 2152eb9cf9
commit ce846d4891

View File

@ -535,6 +535,13 @@ static cell_t SDKCall(IPluginContext *pContext, const cell_t *params)
addr = *(bool **)addr;
}
return *addr ? 1 : 0;
} else if (vc->retinfo->vtype == Valve_VirtualAddress) {
void *addr = (void *)vc->retbuf;
if (vc->retinfo->flags & PASSFLAG_ASPOINTER)
{
addr = *(void **)addr;
}
return g_pSM->ToPseudoAddress((void*)addr);
} else {
cell_t *addr = (cell_t *)vc->retbuf;
if (vc->retinfo->flags & PASSFLAG_ASPOINTER)