From edc6591041287f56f48a0690f4abcbaf50029616 Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Fri, 30 Oct 2009 14:04:43 -0500 Subject: [PATCH] Use SOURCE_ENGINE_ORANGEBOXVALVE constant from MM:S 1.8 (bug 4087, r=dvander). --- loader/loader.cpp | 21 +++++++-------------- loader/msvc9/loader.vcproj | 1 + 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/loader/loader.cpp b/loader/loader.cpp index 49b3274a..63b2f6d7 100644 --- a/loader/loader.cpp +++ b/loader/loader.cpp @@ -1,8 +1,8 @@ /** - * vim: set ts=4 : + * vim: set ts=4 sw=4 tw=99 noet : * ============================================================================= * SourceMod - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. + * Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved. * ============================================================================= * * This program is free software; you can redistribute it and/or modify it under @@ -25,8 +25,6 @@ * this exception to all derivative works. AlliedModders LLC defines further * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), * or . - * - * Version: $Id$ */ #include @@ -48,8 +46,6 @@ return (c == '/' || c == '\\'); } #include - #define TF_PATH "\\tf\\" - #define DOD_PATH "\\dod\\" #else #define DLL_EXPORT extern "C" __attribute__((visibility("default"))) #define openlib(lib) dlopen(lib, RTLD_NOW) @@ -63,8 +59,6 @@ return (c == '/'); } #include - #define TF_PATH "/tf/" - #define DOD_PATH "/dod/" #endif #define METAMOD_API_MAJOR 2 @@ -218,12 +212,6 @@ DLL_EXPORT METAMOD_PLUGIN *CreateInterface_MMS(const MetamodVersionInfo *mvi, co } case SOURCE_ENGINE_ORANGEBOX: { - if (strstr(mli->pl_path, TF_PATH) || strstr(mli->pl_path, DOD_PATH)) - { - filename = FILENAME_1_6_EP2VALVE; - break; - } - filename = FILENAME_1_6_EP2; break; } @@ -237,6 +225,11 @@ DLL_EXPORT METAMOD_PLUGIN *CreateInterface_MMS(const MetamodVersionInfo *mvi, co filename = FILENAME_1_6_DARKM; break; } + case SOURCE_ENGINE_ORANGEBOXVALVE: + { + filename = FILENAME_1_6_EP2VALVE; + break; + } case SOURCE_ENGINE_LEFT4DEAD2: { filename = FILENAME_1_6_L4D2; diff --git a/loader/msvc9/loader.vcproj b/loader/msvc9/loader.vcproj index 18b5d1ce..b064275e 100644 --- a/loader/msvc9/loader.vcproj +++ b/loader/msvc9/loader.vcproj @@ -137,6 +137,7 @@ />