mirror of
https://github.com/Haze1337/Sound-Manager.git
synced 2025-12-07 18:38:33 +00:00
update HookSendSound
This commit is contained in:
parent
fbc5084f55
commit
2e25c3ef98
@ -274,20 +274,21 @@ void HookSendSound()
|
||||
DHookAddParam(hFunction, HookParamType_ObjectPtr);
|
||||
DHookAddParam(hFunction, HookParamType_Bool);
|
||||
|
||||
StartPrepSDKCall(SDKCall_Raw);
|
||||
PrepSDKCall_SetFromConf(hGameData, SDKConf_Virtual, "CBaseClient::GetPlayerSlot");
|
||||
PrepSDKCall_SetReturnInfo(SDKType_PlainOldData, SDKPass_Plain);
|
||||
|
||||
if (!(gH_GetPlayerSlot = EndPrepSDKCall()))
|
||||
{
|
||||
SetFailState("Could not initialize call to CBaseClient::GetPlayerSlot.");
|
||||
}
|
||||
|
||||
if(!DHookEnableDetour(hFunction, false, DHook_SendSound))
|
||||
{
|
||||
SetFailState("Couldn't enable CGameClient::SendSound detour.");
|
||||
}
|
||||
|
||||
StartPrepSDKCall(SDKCall_Raw);
|
||||
PrepSDKCall_SetFromConf(hGameData, SDKConf_Virtual, "CBaseClient::GetPlayerSlot");
|
||||
PrepSDKCall_SetReturnInfo(SDKType_PlainOldData, SDKPass_Plain);
|
||||
gH_GetPlayerSlot = EndPrepSDKCall();
|
||||
|
||||
if(gH_GetPlayerSlot == null)
|
||||
{
|
||||
SetFailState("Could not initialize call to CBaseClient::GetPlayerSlot.");
|
||||
}
|
||||
|
||||
delete hGameData;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user