Let's try that again...
Let's try that again...
1.1 --- a/core/UserMessages.cpp Wed Dec 26 13:34:32 2012 -0500
1.2 +++ b/core/UserMessages.cpp Wed Dec 26 13:56:57 2012 -0500
1.3 @@ -34,7 +34,11 @@
1.4
1.5 UserMessages g_UserMsgs;
1.6
1.7 -#ifndef CSGO_USERMESSAGES_ENABLE
1.8 +#if SOURCE_ENGINE == SE_CSGO
1.9 +#define CSGO_USERMESSAGES_DISABLE
1.10 +#endif
1.11 +
1.12 +#ifndef CSGO_USERMESSAGES_DISABLE
1.13 #if SOURCE_ENGINE >= SE_LEFT4DEAD
1.14 SH_DECL_HOOK3(IVEngineServer, UserMessageBegin, SH_NOATTRIB, 0, bf_write *, IRecipientFilter *, int, const char *);
1.15 #else
1.16 @@ -80,7 +84,7 @@
1.17 {
1.18 if (m_HookCount)
1.19 {
1.20 -#ifndef CSGO_USERMESSAGES_ENABLE
1.21 +#ifndef CSGO_USERMESSAGES_DISABLE
1.22 SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Pre, false);
1.23 SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Post, true);
1.24 SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Pre, false);
1.25 @@ -102,7 +106,7 @@
1.26 int size;
1.27 msgid = 0;
1.28
1.29 -#ifndef CSGO_USERMESSAGES_ENABLE
1.30 +#ifndef CSGO_USERMESSAGES_DISABLE
1.31 while (gamedll->GetUserMessageInfo(msgid, msgbuf, sizeof(msgbuf), size))
1.32 {
1.33 if (strcmp(msgbuf, msg) == 0)
1.34 @@ -128,7 +132,7 @@
1.35
1.36 bool UserMessages::GetMessageName(int msgid, char *buffer, size_t maxlength) const
1.37 {
1.38 -#ifndef CSGO_USERMESSAGES_ENABLE
1.39 +#ifndef CSGO_USERMESSAGES_DISABLE
1.40 if (m_FallbackSearch)
1.41 {
1.42 int size;
1.43 @@ -176,7 +180,7 @@
1.44
1.45 if (m_CurFlags & USERMSG_BLOCKHOOKS)
1.46 {
1.47 -#ifndef CSGO_USERMESSAGES_ENABLE
1.48 +#ifndef CSGO_USERMESSAGES_DISABLE
1.49 #if SOURCE_ENGINE >= SE_LEFT4DEAD
1.50 buffer = ENGINE_CALL(UserMessageBegin)(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id, g_SMAPI->GetUserMessage(msg_id));
1.51 #else
1.52 @@ -262,7 +266,7 @@
1.53
1.54 if (!m_HookCount++)
1.55 {
1.56 -#ifndef CSGO_USERMESSAGES_ENABLE
1.57 +#ifndef CSGO_USERMESSAGES_DISABLE
1.58 SH_ADD_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Pre, false);
1.59 SH_ADD_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Post, true);
1.60 SH_ADD_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Pre, false);
1.61 @@ -321,7 +325,7 @@
1.62 {
1.63 if (--m_HookCount == 0)
1.64 {
1.65 -#ifndef CSGO_USERMESSAGES_ENABLE
1.66 +#ifndef CSGO_USERMESSAGES_DISABLE
1.67 SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Pre, false);
1.68 SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Post, true);
1.69 SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Pre, false);
1.70 @@ -514,7 +518,7 @@
1.71 {
1.72 bf_write *engine_bfw;
1.73
1.74 -#ifndef CSGO_USERMESSAGES_ENABLE
1.75 +#ifndef CSGO_USERMESSAGES_DISABLE
1.76 #if SOURCE_ENGINE >= SE_LEFT4DEAD
1.77 engine_bfw = ENGINE_CALL(UserMessageBegin)(m_CurRecFilter, m_CurId, g_SMAPI->GetUserMessage(m_CurId));
1.78 #else