1.1 --- a/sample_mm/engine_wrappers.h Mon Feb 16 18:13:31 2009 -0500
1.2 +++ b/sample_mm/engine_wrappers.h Wed Feb 18 01:38:23 2009 -0600
1.3 @@ -22,10 +22,9 @@
1.4 extern IVEngineServer *engine;
1.5 extern CGlobalVars *gpGlobals;
1.6
1.7 -/**
1.8 - * For non-OrangeBox builds, we have to make wrappers.
1.9 - */
1.10 -#if SOURCE_ENGINE == SE_EPISODEONE
1.11 +#if SOURCE_ENGINE == SE_EPISODEONE && defined METAMOD_PLAPI_VERSION
1.12 +#error "Metamod:Source 1.6 API is not supported on the old engine."
1.13 +#endif
1.14
1.15 /**
1.16 * MM:S 1.4.x needs older API calls.
1.17 @@ -35,12 +34,15 @@
1.18 #define GetServerFactory serverFactory
1.19 #define MM_Format snprintf
1.20 #define GetCGlobals pGlobals
1.21 +#define ENGINE_CALL(func) SH_CALL(m_EngineCC, func)
1.22 #else
1.23 -#error "Metamod:Source 1.6 is not supported on the old engine."
1.24 +#define ENGINE_CALL(func) SH_CALL(engine, func)
1.25 +#define MM_Format g_SMAPI->Format
1.26 #endif
1.27
1.28 +#if SOURCE_ENGINE <= SE_DARKMESSIAH
1.29 /**
1.30 - * Wrap the CCommand class so our code looks the same for both engines.
1.31 + * Wrap the CCommand class so our code looks the same on all engines.
1.32 */
1.33 class CCommand
1.34 {
1.35 @@ -60,14 +62,7 @@
1.36 }
1.37 };
1.38
1.39 -#define CVAR_INTERFACE_VERSION VENGINE_CVAR_INTERFACE_VERSION
1.40 -#define ENGINE_CALL(func) SH_CALL(m_EngineCC, func)
1.41 -
1.42 -#elif SOURCE_ENGINE >= SE_ORANGEBOX
1.43 -
1.44 -#define ENGINE_CALL(func) SH_CALL(engine, func)
1.45 -#define MM_Format g_SMAPI->Format
1.46 -
1.47 +#define CVAR_INTERFACE_VERSION VENGINE_CVAR_INTERFACE_VERSION
1.48 #endif
1.49
1.50 /**