From 571c1e04092786b2c3a2d65fcd8a8d532d9bd44b Mon Sep 17 00:00:00 2001 From: zaCade Date: Mon, 20 May 2019 17:52:15 +0200 Subject: [PATCH] Update extension.cpp --- extension.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/extension.cpp b/extension.cpp index 02a386e..622eec2 100644 --- a/extension.cpp +++ b/extension.cpp @@ -59,8 +59,6 @@ CDetour *g_pDetour_RecvFrom = NULL; */ DETOUR_DECL_STATIC6(Detour_SendTo, int, int, s, char *, buf, int, len, int, flags, sockaddr *, to, socklen_t*, tolen) { - int retval = DETOUR_STATIC_CALL(Detour_SendTo)(s, buf, len, flags, to, tolen); - if (memcmp(buf, A2S_INFO_REPLY, 5) == 0) { g_pSM->LogMessage(myself, "A2S_INFO_REPLY: %s", buf); @@ -71,7 +69,7 @@ DETOUR_DECL_STATIC6(Detour_SendTo, int, int, s, char *, buf, int, len, int, flag g_pSM->LogMessage(myself, "A2S_PLAYER_REPLY: %s", buf); } - return retval; + return DETOUR_STATIC_CALL(Detour_SendTo)(s, buf, len, flags, to, tolen); } /** @@ -79,8 +77,6 @@ DETOUR_DECL_STATIC6(Detour_SendTo, int, int, s, char *, buf, int, len, int, flag */ DETOUR_DECL_STATIC6(Detour_RecvFrom, int, int, s, char *, buf, int, len, int, flags, sockaddr *, from, socklen_t*, fromlen) { - int retval = DETOUR_STATIC_CALL(Detour_RecvFrom)(s, buf, len, flags, from, fromlen); - // if (memcmp(buf, A2S_INFO_REQUEST, 5) == 0) // { // g_pSM->LogMessage(myself, "A2S_INFO_REQUEST: %s", buf); @@ -91,7 +87,7 @@ DETOUR_DECL_STATIC6(Detour_RecvFrom, int, int, s, char *, buf, int, len, int, fl // g_pSM->LogMessage(myself, "A2S_PLAYER_REQUEST: %s", buf); // } - return retval; + return DETOUR_STATIC_CALL(Detour_RecvFrom)(s, buf, len, flags, from, fromlen); } /**