diff --git a/core/provider/provider_ep2.cpp b/core/provider/provider_ep2.cpp index de4d7e2..16de59d 100644 --- a/core/provider/provider_ep2.cpp +++ b/core/provider/provider_ep2.cpp @@ -63,8 +63,8 @@ DLL_IMPORT ICommandLine *CommandLine(); void CacheUserMessages(); void Detour_Error(const tchar *pMsg, ...); #if SOURCE_ENGINE == SE_DOTA -void ClientCommand(int client, const CCommand &args); -void LocalCommand_Meta(void *pUnknown, const CCommand &args); +void ClientCommand(CEntityIndex index, const CCommand &args); +void LocalCommand_Meta(const CCommandContext &context, const CCommand &args); #elif SOURCE_ENGINE >= SE_ORANGEBOX void ClientCommand(edict_t *pEdict, const CCommand &args); void LocalCommand_Meta(const CCommand &args); @@ -89,7 +89,7 @@ IMetamodSourceProvider *provider = &g_Ep1Provider; ConCommand meta_local_cmd("meta", LocalCommand_Meta, "Metamod:Source control options"); #if SOURCE_ENGINE == SE_DOTA -SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, int, const CCommand &); +SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, CEntityIndex, const CCommand &); #elif SOURCE_ENGINE >= SE_ORANGEBOX SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t *, const CCommand &); #else @@ -509,7 +509,7 @@ public: #endif #if SOURCE_ENGINE == SE_DOTA -void LocalCommand_Meta(void *pUnknown, const CCommand &args) +void LocalCommand_Meta(const CCommandContext &context, const CCommand &args) { GlobCommand cmd(&args); #elif SOURCE_ENGINE >= SE_ORANGEBOX @@ -525,8 +525,9 @@ void LocalCommand_Meta() } #if SOURCE_ENGINE == SE_DOTA -void ClientCommand(int client, const CCommand &_cmd) +void ClientCommand(CEntityIndex index, const CCommand &_cmd) { + int client = index.Get(); GlobCommand cmd(&_cmd); #elif SOURCE_ENGINE >= SE_ORANGEBOX void ClientCommand(edict_t *client, const CCommand &_cmd) diff --git a/core/vsp_bridge.cpp b/core/vsp_bridge.cpp index 5cb65a2..8f0b38b 100644 --- a/core/vsp_bridge.cpp +++ b/core/vsp_bridge.cpp @@ -33,7 +33,7 @@ #include "provider/provider_ep2.h" #if SOURCE_ENGINE == SE_DOTA -SH_DECL_HOOK2_void(ConCommand, Dispatch, SH_NOATTRIB, false, void *, const CCommand &); +SH_DECL_HOOK2_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommandContext &, const CCommand &); #elif SOURCE_ENGINE >= SE_ORANGEBOX SH_DECL_HOOK1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &); #else @@ -45,7 +45,7 @@ bool g_bIsTryingToUnload; const char *vsp_desc = "Metamod:Source " MMS_FULL_VERSION; #if SOURCE_ENGINE == SE_DOTA -void InterceptPluginUnloads(void *pUnknown, const CCommand &args) +void InterceptPluginUnloads(const CCommandContext &context, const CCommand &args) #elif SOURCE_ENGINE >= SE_ORANGEBOX void InterceptPluginUnloads(const CCommand &args) #else @@ -56,7 +56,7 @@ void InterceptPluginUnloads() } #if SOURCE_ENGINE == SE_DOTA -void InterceptPluginUnloads_Post(void *pUnknown, const CCommand &args) +void InterceptPluginUnloads_Post(const CCommandContext &context, const CCommand &args) #elif SOURCE_ENGINE >= SE_ORANGEBOX void InterceptPluginUnloads_Post(const CCommand &args) #else