From cf4f500eda5c26ab4ef09d334d1d0763f0028b63 Mon Sep 17 00:00:00 2001 From: Fyren Date: Wed, 18 Nov 2015 01:37:15 +0000 Subject: [PATCH] And use it in sdktools, too. --- extensions/sdktools/vsound.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/sdktools/vsound.cpp b/extensions/sdktools/vsound.cpp index cfd4ec6a..0909118f 100644 --- a/extensions/sdktools/vsound.cpp +++ b/extensions/sdktools/vsound.cpp @@ -410,9 +410,9 @@ void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChann if (!pPlayer) { - pFunc->GetParentContext()->ThrowNativeError("Client index %d is invalid", client); + pFunc->GetParentContext()->BlamePluginError(pFunc, "Callback-provided client index %d is invalid", client); } else if (!pPlayer->IsInGame()) { - pFunc->GetParentContext()->ThrowNativeError("Client %d is not connected", client); + pFunc->GetParentContext()->BlamePluginError(pFunc, "Client %d is not connected", client); } else { continue; } @@ -548,9 +548,9 @@ void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChan if (!pPlayer) { - pFunc->GetParentContext()->ThrowNativeError("Client index %d is invalid", client); + pFunc->GetParentContext()->BlamePluginError(pFunc, "Client index %d is invalid", client); } else if (!pPlayer->IsInGame()) { - pFunc->GetParentContext()->ThrowNativeError("Client %d is not connected", client); + pFunc->GetParentContext()->BlamePluginError(pFunc, "Client %d is not connected", client); } else { continue; }