mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2024-11-29 11:24:19 +01:00
Fixed core VSP listening when bridged as a VSP.
This commit is contained in:
parent
408f22481e
commit
9066e6f509
@ -138,12 +138,6 @@ SourceMM::ISmmAPI *g_pMetamod = &g_Metamod;
|
|||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
mm_SetVspInfo(IServerPluginCallbacks *ispc, unsigned int version)
|
|
||||||
{
|
|
||||||
vsp_version = version;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialize everything here */
|
/* Initialize everything here */
|
||||||
void
|
void
|
||||||
mm_InitializeForLoad()
|
mm_InitializeForLoad()
|
||||||
@ -1069,8 +1063,11 @@ int MetamodSource::GetSourceEngineBuild()
|
|||||||
return engine_build;
|
return engine_build;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetamodSource::NotifyVSPListening(IServerPluginCallbacks *callbacks)
|
void MetamodSource::NotifyVSPListening(IServerPluginCallbacks *callbacks, int version)
|
||||||
{
|
{
|
||||||
|
if (version != -1)
|
||||||
|
vsp_version = version;
|
||||||
|
|
||||||
vsp_callbacks = callbacks;
|
vsp_callbacks = callbacks;
|
||||||
ITER_EVENT(OnVSPListening, (callbacks));
|
ITER_EVENT(OnVSPListening, (callbacks));
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ public:
|
|||||||
const char *GetGameBinaryPath();
|
const char *GetGameBinaryPath();
|
||||||
const char *GetPluginsFile();
|
const char *GetPluginsFile();
|
||||||
void UnregisterConCommandBase(PluginId id, ConCommandBase *pCommand);
|
void UnregisterConCommandBase(PluginId id, ConCommandBase *pCommand);
|
||||||
void NotifyVSPListening(IServerPluginCallbacks *callbacks);
|
void NotifyVSPListening(IServerPluginCallbacks *callbacks, int version);
|
||||||
void SetGameDLLInfo(CreateInterfaceFn serverFactory, int version, bool loaded);
|
void SetGameDLLInfo(CreateInterfaceFn serverFactory, int version, bool loaded);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -124,9 +124,6 @@ mm_StartupMetamod(bool is_vsp_load);
|
|||||||
void
|
void
|
||||||
mm_UnloadMetamod();
|
mm_UnloadMetamod();
|
||||||
|
|
||||||
void
|
|
||||||
mm_SetVspInfo(IServerPluginCallbacks *ispc, unsigned int version);
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
mm_IsVspBridged();
|
mm_IsVspBridged();
|
||||||
|
|
||||||
|
@ -146,12 +146,16 @@ bool VSPListener::Load(CreateInterfaceFn interfaceFactory, CreateInterfaceFn gam
|
|||||||
m_bLoaded = true;
|
m_bLoaded = true;
|
||||||
SetLoadable(false);
|
SetLoadable(false);
|
||||||
|
|
||||||
g_Metamod.NotifyVSPListening(this);
|
g_Metamod.NotifyVSPListening(this, -1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VSPListener::OnQueryCvarValueFinished(QueryCvarCookie_t iCookie, edict_t *pPlayerEntity, EQueryCvarValueStatus eStatus, const char *pCvarName, const char *pCvarValue )
|
void VSPListener::OnQueryCvarValueFinished(QueryCvarCookie_t iCookie,
|
||||||
|
edict_t *pPlayerEntity,
|
||||||
|
EQueryCvarValueStatus eStatus,
|
||||||
|
const char *pCvarName,
|
||||||
|
const char *pCvarValue)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,6 +77,7 @@ public:
|
|||||||
(CreateInterfaceFn)info->engineFactory,
|
(CreateInterfaceFn)info->engineFactory,
|
||||||
(CreateInterfaceFn)info->engineFactory,
|
(CreateInterfaceFn)info->engineFactory,
|
||||||
pGlobals);
|
pGlobals);
|
||||||
|
g_Metamod.NotifyVSPListening(info->vsp_callbacks, info->vsp_version);
|
||||||
mm_StartupMetamod(true);
|
mm_StartupMetamod(true);
|
||||||
|
|
||||||
g_plugin_unload = icvar->FindCommand("plugin_unload");
|
g_plugin_unload = icvar->FindCommand("plugin_unload");
|
||||||
|
Loading…
Reference in New Issue
Block a user