1.1 --- a/core/ChatTriggers.cpp Sat Oct 13 22:13:43 2007 +0000
1.2 +++ b/core/ChatTriggers.cpp Sun Oct 14 00:04:21 2007 +0000
1.3 @@ -36,13 +36,17 @@
1.4 #include <IPlayerHelpers.h>
1.5
1.6 /* :HACKHACK: We can't SH_DECL here because ConCmdManager.cpp does */
1.7 +#if defined ORANGEBOX_BUILD
1.8 +extern bool __SourceHook_FHRemoveConCommandDispatch(void *, bool, class fastdelegate::FastDelegate1<const CCommand &, void>);
1.9 +extern int __SourceHook_FHAddConCommandDispatch(void *, ISourceHook::AddHookMode, bool, class fastdelegate::FastDelegate1<const CCommand &, void>);
1.10 +#else
1.11 extern bool __SourceHook_FHRemoveConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0<void>);
1.12 -
1.13 #if SH_IMPL_VERSION >= 4
1.14 extern int __SourceHook_FHAddConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0<void>);
1.15 #else
1.16 extern bool __SourceHook_FHAddConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0<void>);
1.17 -#endif
1.18 +#endif //SH_IMPL_VERSION >= 4
1.19 +#endif //ORANGEBOX_BUILD
1.20
1.21 ChatTriggers g_ChatTriggers;
1.22
1.23 @@ -140,8 +144,14 @@
1.24 }
1.25 }
1.26
1.27 +#if defined ORANGEBOX_BUILD
1.28 +void ChatTriggers::OnSayCommand_Pre(const CCommand &command)
1.29 +{
1.30 +#else
1.31 void ChatTriggers::OnSayCommand_Pre()
1.32 {
1.33 + CCommand command;
1.34 +#endif
1.35 int client = g_ConCmds.GetCommandClient();
1.36 m_bIsChatTrigger = false;
1.37
1.38 @@ -151,7 +161,7 @@
1.39 RETURN_META(MRES_IGNORED);
1.40 }
1.41
1.42 - const char *args = engine->Cmd_Args();
1.43 + const char *args = command.ArgS();
1.44
1.45 if (!args)
1.46 {
1.47 @@ -211,7 +221,11 @@
1.48 RETURN_META(MRES_IGNORED);
1.49 }
1.50
1.51 +#if defined ORANGEBOX_BUILD
1.52 +void ChatTriggers::OnSayCommand_Post(const CCommand &command)
1.53 +#else
1.54 void ChatTriggers::OnSayCommand_Post()
1.55 +#endif
1.56 {
1.57 m_bIsChatTrigger = false;
1.58 if (m_bWillProcessInPost)