whoops, fixed a versioning bug

--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40372
This commit is contained in:
David Anderson 2007-04-07 04:31:23 +00:00
parent 50cc1b7356
commit d386a5b624

View File

@ -58,7 +58,8 @@ bool bGameInit = false;
SourceHook::List<GameDllInfo *> gamedll_list; SourceHook::List<GameDllInfo *> gamedll_list;
SourceHook::CallClass<IServerGameDLL> *g_GameDllPatch; SourceHook::CallClass<IServerGameDLL> *g_GameDllPatch;
int g_GameDllVersion = 0; int g_GameDllVersion = 0;
const char VSPIFACE[] = "ISERVERPLUGINCALLBACKS"; const char VSPIFACE_001[] = "ISERVERPLUGINCALLBACKS001";
const char VSPIFACE_002[] = "ISERVERPLUGINCALLBACKS002";
const char GAMEINFO_PATH[] = "|gameinfo_path|"; const char GAMEINFO_PATH[] = "|gameinfo_path|";
void ClearGamedllList(); void ClearGamedllList();
@ -226,13 +227,16 @@ SMM_API void *CreateInterface(const char *iface, int *ret)
return NULL; return NULL;
} }
if (strncmp(iface, VSPIFACE, 22) == 0) /* We check these separately because we can't reply
* unless our interface version really matches.
*/
if ((strcmp(iface, VSPIFACE_002) == 0)
|| strcmp(iface, VSPIFACE_001) == 0)
{ {
if (ret) if (ret)
{ {
*ret = IFACE_OK; *ret = IFACE_OK;
} }
return &g_VspListener; return &g_VspListener;
} }