Fix more sdktools crash on 64 bits (#2152)
* fix sdktools crash on 64 bits * remove other 32bit-isms from sdktools * Swap sizeof(intptr_t) for sizeof(void *) --------- Co-authored-by: Nick Hastings <[email protected]>
This commit is contained in:
co-authored by
Nick Hastings
parent
b6d98c762c
commit
5edfa79543
@@ -234,7 +234,7 @@ void CHookManager::OnClientConnected(int client)
|
||||
}
|
||||
}
|
||||
|
||||
int hookid = SH_ADD_VPHOOK(IClientMessageHandler, ProcessVoiceData, (IClientMessageHandler *)((intptr_t)(pClient) + 4), SH_MEMBER(this, &CHookManager::ProcessVoiceData), true);
|
||||
int hookid = SH_ADD_VPHOOK(IClientMessageHandler, ProcessVoiceData, (IClientMessageHandler *)((intptr_t)(pClient) + sizeof(void *)), SH_MEMBER(this, &CHookManager::ProcessVoiceData), true);
|
||||
hook.SetHookID(hookid);
|
||||
netProcessVoiceData.push_back(new CVTableHook(hook));
|
||||
}
|
||||
@@ -584,7 +584,7 @@ bool CHookManager::SendFile(const char *filename, unsigned int transferID)
|
||||
#if !defined CLIENTVOICE_HOOK_SUPPORT
|
||||
bool CHookManager::ProcessVoiceData(CLC_VoiceData *msg)
|
||||
{
|
||||
IClient *pClient = (IClient *)((intptr_t)(META_IFACEPTR(IClient)) - 4);
|
||||
IClient *pClient = (IClient *)((intptr_t)(META_IFACEPTR(IClient)) - sizeof(void *));
|
||||
if (pClient == NULL)
|
||||
{
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user