From 20ed5c338c39ca7c086a2826ae0a1d18ee4d00f0 Mon Sep 17 00:00:00 2001 From: Ryan Stecker Date: Mon, 15 Dec 2014 23:07:53 -0600 Subject: [PATCH] Fix UserMessageToBfWrite and UserMessageToBfRead not working correctly for non-protobuf usermessages. --- plugins/include/usermessages.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/include/usermessages.inc b/plugins/include/usermessages.inc index 3522e7b2..d2bbfedb 100644 --- a/plugins/include/usermessages.inc +++ b/plugins/include/usermessages.inc @@ -80,7 +80,7 @@ stock Protobuf UserMessageToProtobuf(Handle msg) // Make sure to only call this on writable buffers (eg from StartMessage). stock BfWrite UserMessageToBfWrite(Handle msg) { - if (GetUserMessageType() != UM_Protobuf) + if (GetUserMessageType() == UM_Protobuf) return null; return BfWrite:msg; } @@ -88,7 +88,7 @@ stock BfWrite UserMessageToBfWrite(Handle msg) // Make sure to only call this on readable buffers (eg from a message hook). stock BfWrite UserMessageToBfRead(Handle msg) { - if (GetUserMessageType() != UM_Protobuf) + if (GetUserMessageType() == UM_Protobuf) return null; return BfRead:msg; }