Tweaked Dota 2 support to account for lack of IPluginHelpers (bug 5656, r=asherkin).

This commit is contained in:
Nicholas Hastings
2013-03-19 11:19:19 -04:00
parent 519e8c5fcd
commit 877ef76540
9 changed files with 30 additions and 0 deletions
+2
View File
@@ -247,7 +247,9 @@ bool SDKTools::SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool
GET_V_IFACE_ANY(GetEngineFactory, engsound, IEngineSound, IENGINESOUND_SERVER_INTERFACE_VERSION);
GET_V_IFACE_ANY(GetEngineFactory, enginetrace, IEngineTrace, INTERFACEVERSION_ENGINETRACE_SERVER);
GET_V_IFACE_ANY(GetEngineFactory, netstringtables, INetworkStringTableContainer, INTERFACENAME_NETWORKSTRINGTABLESERVER);
#if SOURCE_ENGINE != SE_DOTA
GET_V_IFACE_ANY(GetEngineFactory, pluginhelpers, IServerPluginHelpers, INTERFACEVERSION_ISERVERPLUGINHELPERS);
#endif
GET_V_IFACE_ANY(GetServerFactory, serverClients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS);
GET_V_IFACE_ANY(GetEngineFactory, voiceserver, IVoiceServer, INTERFACEVERSION_VOICESERVER);
GET_V_IFACE_ANY(GetServerFactory, playerinfomngr, IPlayerInfoManager, INTERFACEVERSION_PLAYERINFOMANAGER);
+4
View File
@@ -565,7 +565,11 @@ static cell_t SlapPlayer(IPluginContext *pContext, const cell_t *params)
/* Force suicide */
if (should_slay)
{
#if SOURCE_ENGINE == SE_DOTA
engine->ClientCommand(pEdict, "kill\n");
#else
pluginhelpers->ClientCommand(pEdict, "kill\n");
#endif
}
if (s_frag_offs > 0)