From 528bbe0116a36cd92e19e415f66d7f044f28d2da Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 28 Oct 2009 23:30:52 -0700 Subject: [PATCH] Build against MM:S 1.8 with core-legacy (bug 4076, r=ds). --- core/ConsoleDetours.cpp | 9 +++++++-- core/CoreConfig.cpp | 6 +++++- core/NextMap.cpp | 6 +++++- core/PlayerManager.cpp | 6 +++++- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/core/ConsoleDetours.cpp b/core/ConsoleDetours.cpp index f7e8c383..c52fe122 100644 --- a/core/ConsoleDetours.cpp +++ b/core/ConsoleDetours.cpp @@ -64,8 +64,13 @@ # else SH_DECL_EXTERN0_void(ConCommand, Dispatch, SH_NOATTRIB, false); # endif -#elif SH_IMPL_VERSION == 3 -extern bool __SourceHook_FHAddConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0); +#else +# if SH_IMPL_VERSION >= 4 + extern int __SourceHook_FHVPAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0,bool); + extern int __SourceHook_FHAddConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0); +# else + extern bool __SourceHook_FHAddConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0); +# endif extern bool __SourceHook_FHRemoveConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0); #endif diff --git a/core/CoreConfig.cpp b/core/CoreConfig.cpp index 4d7119e3..2c499360 100644 --- a/core/CoreConfig.cpp +++ b/core/CoreConfig.cpp @@ -68,7 +68,11 @@ void Hook_ExecDispatchPre(const CCommand &cmd) SH_DECL_EXTERN0_void(ConCommand, Dispatch, SH_NOATTRIB, false); void Hook_ExecDispatchPre() #else -extern bool __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0); +# if SH_IMPL_VERSION >= 4 + extern int __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0); +# else + extern bool __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0); +# endif extern bool __SourceHook_FHRemoveConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0); void Hook_ExecDispatchPre() #endif diff --git a/core/NextMap.cpp b/core/NextMap.cpp index d88776ce..605a1577 100644 --- a/core/NextMap.cpp +++ b/core/NextMap.cpp @@ -49,7 +49,11 @@ SH_DECL_EXTERN1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &) #elif SOURCE_ENGINE == SE_DARKMESSIAH SH_DECL_EXTERN0_void(ConCommand, Dispatch, SH_NOATTRIB, false); #else -extern bool __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0); +# if SH_IMPL_VERSION >= 4 + extern int __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0); +# else + extern bool __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0); +#endif extern bool __SourceHook_FHRemoveConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0); #endif diff --git a/core/PlayerManager.cpp b/core/PlayerManager.cpp index c98da63d..0613c28b 100644 --- a/core/PlayerManager.cpp +++ b/core/PlayerManager.cpp @@ -76,7 +76,11 @@ SH_DECL_EXTERN1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &) #elif SOURCE_ENGINE == SE_DARKMESSIAH SH_DECL_EXTERN0_void(ConCommand, Dispatch, SH_NOATTRIB, false); #else -extern bool __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0); +# if SH_IMPL_VERSION >= 4 + extern int __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0); +# else + extern bool __SourceHook_FHAddConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0); +# endif extern bool __SourceHook_FHRemoveConCommandDispatch(void *,bool,class fastdelegate::FastDelegate0); #endif