1.1 --- a/loader/loader.cpp Sun Oct 14 22:12:46 2007 +0000
1.2 +++ b/loader/loader.cpp Sun Oct 14 22:17:14 2007 +0000
1.3 @@ -68,6 +68,7 @@
1.4 #define FILENAME_1_6_EP1 "sourcemod.2.ep1" PLATFORM_EXT
1.5
1.6 HINSTANCE g_hCore = NULL;
1.7 +bool load_attempted = false;
1.8
1.9 size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...)
1.10 {
1.11 @@ -140,6 +141,8 @@
1.12 DLL_EXPORT METAMOD_PLUGIN *CreateInterface_MMS(const MetamodVersionInfo *mvi, const MetamodLoaderInfo *mli)
1.13 {
1.14 char *filename;
1.15 +
1.16 + load_attempted = true;
1.17
1.18 if (mvi->api_major > METAMOD_API_MAJOR)
1.19 {
1.20 @@ -182,7 +185,15 @@
1.21
1.22 DLL_EXPORT void *CreateInterface(const char *iface, int *ret)
1.23 {
1.24 - if (strcmp(iface, METAMOD_PLAPI_NAME))
1.25 + /**
1.26 + * If a load has already been attempted, bail out immediately.
1.27 + */
1.28 + if (load_attempted)
1.29 + {
1.30 + return NULL;
1.31 + }
1.32 +
1.33 + if (strcmp(iface, METAMOD_PLAPI_NAME) == 0)
1.34 {
1.35 char thisfile[256];
1.36 char targetfile[256];