Updated for latest hl2sdk-dota changes.
authorNicholas Hastings <skamonkey@gmail.com>
Fri Jul 12 02:31:41 2013 -0400 (2013-07-12)
changeset 39427aaa00382627
parent 3941 0ef2a531093b
child 3943 55f0584a7eda
Updated for latest hl2sdk-dota changes.
core/CellRecipientFilter.h
core/ChatTriggers.cpp
core/ChatTriggers.h
core/ConCmdManager.cpp
core/ConCmdManager.h
core/ConVarManager.cpp
core/ConVarManager.h
core/ConsoleDetours.cpp
core/CoreConfig.cpp
core/NextMap.cpp
core/NextMap.h
core/PlayerManager.cpp
core/PlayerManager.h
core/convar_sm_dota.h
core/smn_halflife.cpp
core/smn_usermsgs.cpp
extensions/sdktools/CellRecipientFilter.h
extensions/sdktools/extension.h
extensions/sdktools/tenatives.cpp
extensions/sdktools/voice.cpp
extensions/sdktools/vsound.cpp
extensions/sdktools/vsound.h
     1.1 --- a/core/CellRecipientFilter.h	Wed Jul 10 20:46:00 2013 -0400
     1.2 +++ b/core/CellRecipientFilter.h	Fri Jul 12 02:31:41 2013 -0400
     1.3 @@ -45,7 +45,7 @@
     1.4  	bool IsInitMessage() const;
     1.5  	int GetRecipientCount() const;
     1.6  #if SOURCE_ENGINE == SE_DOTA
     1.7 -	void GetRecipientIndex(int *clientIndex, int slot) const;
     1.8 +	CEntityIndex GetRecipientIndex(int slot) const;
     1.9  #else
    1.10  	int GetRecipientIndex(int slot) const;
    1.11  #endif
    1.12 @@ -84,7 +84,7 @@
    1.13  }
    1.14  
    1.15  #if SOURCE_ENGINE == SE_DOTA
    1.16 -inline void CellRecipientFilter::GetRecipientIndex(int *clientIndex, int slot) const
    1.17 +inline CEntityIndex CellRecipientFilter::GetRecipientIndex(int slot) const
    1.18  #else
    1.19  inline int CellRecipientFilter::GetRecipientIndex(int slot) const
    1.20  #endif
    1.21 @@ -97,7 +97,7 @@
    1.22  	ret = static_cast<int>(m_Players[slot]);
    1.23  
    1.24  #if SOURCE_ENGINE == SE_DOTA
    1.25 -	*clientIndex = ret;
    1.26 +	return CEntityIndex(ret);
    1.27  #else
    1.28  	return ret;
    1.29  #endif
     2.1 --- a/core/ChatTriggers.cpp	Wed Jul 10 20:46:00 2013 -0400
     2.2 +++ b/core/ChatTriggers.cpp	Fri Jul 12 02:31:41 2013 -0400
     2.3 @@ -38,7 +38,7 @@
     2.4  #include "logic_bridge.h"
     2.5  
     2.6  #if SOURCE_ENGINE == SE_DOTA
     2.7 -SH_DECL_EXTERN2_void(ConCommand, Dispatch, SH_NOATTRIB, false, void *, const CCommand &);
     2.8 +SH_DECL_EXTERN2_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommandContext &, const CCommand &);
     2.9  #elif SOURCE_ENGINE >= SE_ORANGEBOX
    2.10  SH_DECL_EXTERN1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &);
    2.11  #elif SOURCE_ENGINE == SE_DARKMESSIAH
    2.12 @@ -148,7 +148,7 @@
    2.13  }
    2.14  
    2.15  #if SOURCE_ENGINE == SE_DOTA
    2.16 -void ChatTriggers::OnSayCommand_Pre(void *pUnknown, const CCommand &command)
    2.17 +void ChatTriggers::OnSayCommand_Pre(const CCommandContext &context, const CCommand &command)
    2.18  {
    2.19  #elif SOURCE_ENGINE >= SE_ORANGEBOX
    2.20  void ChatTriggers::OnSayCommand_Pre(const CCommand &command)
    2.21 @@ -268,7 +268,7 @@
    2.22  }
    2.23  
    2.24  #if SOURCE_ENGINE == SE_DOTA
    2.25 -void ChatTriggers::OnSayCommand_Post(void *pUnknown, const CCommand &command)
    2.26 +void ChatTriggers::OnSayCommand_Post(const CCommandContext &context, const CCommand &command)
    2.27  #elif SOURCE_ENGINE >= SE_ORANGEBOX
    2.28  void ChatTriggers::OnSayCommand_Post(const CCommand &command)
    2.29  #else
     3.1 --- a/core/ChatTriggers.h	Wed Jul 10 20:46:00 2013 -0400
     3.2 +++ b/core/ChatTriggers.h	Fri Jul 12 02:31:41 2013 -0400
     3.3 @@ -55,8 +55,8 @@
     3.4  		size_t maxlength);
     3.5  private: //ConCommand
     3.6  #if SOURCE_ENGINE == SE_DOTA
     3.7 -	void OnSayCommand_Pre(void *pUnknown, const CCommand &command);
     3.8 -	void OnSayCommand_Post(void *pUnknown, const CCommand &command);
     3.9 +	void OnSayCommand_Pre(const CCommandContext &, const CCommand &command);
    3.10 +	void OnSayCommand_Post(const CCommandContext &, const CCommand &command);
    3.11  #elif SOURCE_ENGINE >= SE_ORANGEBOX
    3.12  	void OnSayCommand_Pre(const CCommand &command);
    3.13  	void OnSayCommand_Post(const CCommand &command);
     4.1 --- a/core/ConCmdManager.cpp	Wed Jul 10 20:46:00 2013 -0400
     4.2 +++ b/core/ConCmdManager.cpp	Fri Jul 12 02:31:41 2013 -0400
     4.3 @@ -41,7 +41,7 @@
     4.4  ConCmdManager g_ConCmds;
     4.5  
     4.6  #if SOURCE_ENGINE == SE_DOTA
     4.7 -	SH_DECL_HOOK2_void(ConCommand, Dispatch, SH_NOATTRIB, false, void *, const CCommand &);
     4.8 +	SH_DECL_HOOK2_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommandContext &, const CCommand &);
     4.9  #elif SOURCE_ENGINE >= SE_ORANGEBOX
    4.10  	SH_DECL_HOOK1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &);
    4.11  #else
    4.12 @@ -209,7 +209,7 @@
    4.13  	}
    4.14  }
    4.15  #if SOURCE_ENGINE == SE_DOTA
    4.16 -void CommandCallback(void *pUnknown, const CCommand &command)
    4.17 +void CommandCallback(const CCommandContext &context, const CCommand &command)
    4.18  {
    4.19  #elif SOURCE_ENGINE >= SE_ORANGEBOX
    4.20  void CommandCallback(const CCommand &command)
     5.1 --- a/core/ConCmdManager.h	Wed Jul 10 20:46:00 2013 -0400
     5.2 +++ b/core/ConCmdManager.h	Fri Jul 12 02:31:41 2013 -0400
     5.3 @@ -99,7 +99,7 @@
     5.4  	public IConCommandTracker
     5.5  {
     5.6  #if SOURCE_ENGINE == SE_DOTA
     5.7 -	friend void CommandCallback(void *pUnknown, const CCommand &command);
     5.8 +	friend void CommandCallback(const CCommandContext &context, const CCommand &command);
     5.9  #elif SOURCE_ENGINE >= SE_ORANGEBOX
    5.10  	friend void CommandCallback(const CCommand &command);
    5.11  #else
     6.1 --- a/core/ConVarManager.cpp	Wed Jul 10 20:46:00 2013 -0400
     6.2 +++ b/core/ConVarManager.cpp	Fri Jul 12 02:31:41 2013 -0400
     6.3 @@ -44,7 +44,10 @@
     6.4  SH_DECL_HOOK2_void(ICvar, CallGlobalChangeCallback, SH_NOATTRIB, false, ConVar *, const char *);
     6.5  #endif
     6.6  
     6.7 -#if SOURCE_ENGINE != SE_DARKMESSIAH
     6.8 +#if SOURCE_ENGINE == SE_DOTA
     6.9 +SH_DECL_HOOK5_void(IServerGameDLL, OnQueryCvarValueFinished, SH_NOATTRIB, 0, QueryCvarCookie_t, CEntityIndex, EQueryCvarValueStatus, const char *, const char *);
    6.10 +SH_DECL_HOOK5_void(IServerPluginCallbacks, OnQueryCvarValueFinished, SH_NOATTRIB, 0, QueryCvarCookie_t, CEntityIndex, EQueryCvarValueStatus, const char *, const char *);
    6.11 +#elif SOURCE_ENGINE != SE_DARKMESSIAH
    6.12  SH_DECL_HOOK5_void(IServerGameDLL, OnQueryCvarValueFinished, SH_NOATTRIB, 0, QueryCvarCookie_t, edict_t *, EQueryCvarValueStatus, const char *, const char *);
    6.13  SH_DECL_HOOK5_void(IServerPluginCallbacks, OnQueryCvarValueFinished, SH_NOATTRIB, 0, QueryCvarCookie_t, edict_t *, EQueryCvarValueStatus, const char *, const char *);
    6.14  #endif
    6.15 @@ -185,7 +188,9 @@
    6.16  	}
    6.17  	else if (m_bIsVSPQueryHooked)
    6.18  	{
    6.19 +#if SOURCE_ENGINE != SE_DOTA
    6.20  		SH_REMOVE_HOOK(IServerPluginCallbacks, OnQueryCvarValueFinished, vsp_interface, SH_MEMBER(this, &ConVarManager::OnQueryCvarValueFinished), false);
    6.21 +#endif
    6.22  		m_bIsVSPQueryHooked = false;
    6.23  	}
    6.24  #endif
    6.25 @@ -232,7 +237,7 @@
    6.26  	}
    6.27  #endif
    6.28  
    6.29 -#if SOURCE_ENGINE != SE_DARKMESSIAH
    6.30 +#if SOURCE_ENGINE != SE_DARKMESSIAH && SOURCE_ENGINE != SE_DOTA
    6.31  	SH_ADD_HOOK(IServerPluginCallbacks, OnQueryCvarValueFinished, vsp_interface, SH_MEMBER(this, &ConVarManager::OnQueryCvarValueFinished), false);
    6.32  	m_bIsVSPQueryHooked = true;
    6.33  #endif
    6.34 @@ -612,7 +617,7 @@
    6.35  	if (m_bIsDLLQueryHooked)
    6.36  	{
    6.37  #if SOURCE_ENGINE == SE_DOTA
    6.38 -		cookie = engine->StartQueryCvarValue(IndexOfEdict(pPlayer), name);
    6.39 +		cookie = engine->StartQueryCvarValue(CEntityIndex(IndexOfEdict(pPlayer)), name);
    6.40  #else
    6.41  		cookie = engine->StartQueryCvarValue(pPlayer, name);	
    6.42  #endif
    6.43 @@ -727,7 +732,11 @@
    6.44  }
    6.45  
    6.46  #if SOURCE_ENGINE != SE_DARKMESSIAH
    6.47 +#if SOURCE_ENGINE == SE_DOTA
    6.48 +void ConVarManager::OnQueryCvarValueFinished(QueryCvarCookie_t cookie, CEntityIndex player, EQueryCvarValueStatus result, const char *cvarName, const char *cvarValue)
    6.49 +#else
    6.50  void ConVarManager::OnQueryCvarValueFinished(QueryCvarCookie_t cookie, edict_t *pPlayer, EQueryCvarValueStatus result, const char *cvarName, const char *cvarValue)
    6.51 +#endif // SE_DOTA
    6.52  {
    6.53  	IPluginFunction *pCallback = NULL;
    6.54  	cell_t value = 0;
    6.55 @@ -749,7 +758,11 @@
    6.56  		cell_t ret;
    6.57  
    6.58  		pCallback->PushCell(cookie);
    6.59 +#if SOURCE_ENGINE == SE_DOTA
    6.60 +		pCallback->PushCell(player.Get());
    6.61 +#else
    6.62  		pCallback->PushCell(IndexOfEdict(pPlayer));
    6.63 +#endif
    6.64  		pCallback->PushCell(result);
    6.65  		pCallback->PushString(cvarName);
    6.66  
     7.1 --- a/core/ConVarManager.h	Wed Jul 10 20:46:00 2013 -0400
     7.2 +++ b/core/ConVarManager.h	Fri Jul 12 02:31:41 2013 -0400
     7.3 @@ -154,7 +154,10 @@
     7.4  	/**
     7.5  	 * Callback for when StartQueryCvarValue() has finished.
     7.6  	 */
     7.7 -#if SOURCE_ENGINE != SE_DARKMESSIAH
     7.8 +#if SOURCE_ENGINE == SE_DOTA
     7.9 +	void OnQueryCvarValueFinished(QueryCvarCookie_t cookie, CEntityIndex player, EQueryCvarValueStatus result,
    7.10 +	                              const char *cvarName, const char *cvarValue);
    7.11 +#elif SOURCE_ENGINE != SE_DARKMESSIAH
    7.12  	void OnQueryCvarValueFinished(QueryCvarCookie_t cookie, edict_t *pPlayer, EQueryCvarValueStatus result,
    7.13  	                              const char *cvarName, const char *cvarValue);
    7.14  #endif
     8.1 --- a/core/ConsoleDetours.cpp	Wed Jul 10 20:46:00 2013 -0400
     8.2 +++ b/core/ConsoleDetours.cpp	Fri Jul 12 02:31:41 2013 -0400
     8.3 @@ -60,7 +60,7 @@
     8.4  
     8.5  #if SH_IMPL_VERSION >= 5
     8.6  # if SOURCE_ENGINE == SE_DOTA
     8.7 -	SH_DECL_EXTERN2_void(ConCommand, Dispatch, SH_NOATTRIB, false, void *, const CCommand &);
     8.8 +	SH_DECL_EXTERN2_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommandContext &, const CCommand &);
     8.9  # elif SOURCE_ENGINE >= SE_ORANGEBOX
    8.10  	SH_DECL_EXTERN1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &);
    8.11  # else
    8.12 @@ -134,7 +134,7 @@
    8.13  	}
    8.14  
    8.15  # if SOURCE_ENGINE == SE_DOTA
    8.16 -	void Dispatch(void *pUnknown, const CCommand& args)
    8.17 +	void Dispatch(const CCommandContext &context, const CCommand& args)
    8.18  # elif SOURCE_ENGINE >= SE_ORANGEBOX
    8.19  	void Dispatch(const CCommand& args)
    8.20  # else
     9.1 --- a/core/CoreConfig.cpp	Wed Jul 10 20:46:00 2013 -0400
     9.2 +++ b/core/CoreConfig.cpp	Fri Jul 12 02:31:41 2013 -0400
     9.3 @@ -62,8 +62,8 @@
     9.4  void CheckAndFinalizeConfigs();
     9.5  
     9.6  #if SOURCE_ENGINE == SE_DOTA
     9.7 -SH_DECL_EXTERN2_void(ConCommand, Dispatch, SH_NOATTRIB, false, void *, const CCommand &);
     9.8 -void Hook_ExecDispatchPre(void *pUnknown, const CCommand &cmd)
     9.9 +SH_DECL_EXTERN2_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommandContext &, const CCommand &);
    9.10 +void Hook_ExecDispatchPre(const CCommandContext &context, const CCommand &cmd)
    9.11  #elif SOURCE_ENGINE >= SE_ORANGEBOX
    9.12  SH_DECL_EXTERN1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &);
    9.13  void Hook_ExecDispatchPre(const CCommand &cmd)
    9.14 @@ -93,7 +93,7 @@
    9.15  }
    9.16  
    9.17  #if SOURCE_ENGINE == SE_DOTA
    9.18 -void Hook_ExecDispatchPost(void *pUnknown, const CCommand &cmd)
    9.19 +void Hook_ExecDispatchPost(const CCommandContext &context, const CCommand &cmd)
    9.20  #elif SOURCE_ENGINE >= SE_ORANGEBOX
    9.21  void Hook_ExecDispatchPost(const CCommand &cmd)
    9.22  #else
    10.1 --- a/core/NextMap.cpp	Wed Jul 10 20:46:00 2013 -0400
    10.2 +++ b/core/NextMap.cpp	Fri Jul 12 02:31:41 2013 -0400
    10.3 @@ -46,7 +46,7 @@
    10.4  #endif
    10.5  
    10.6  #if SOURCE_ENGINE == SE_DOTA
    10.7 -SH_DECL_EXTERN2_void(ConCommand, Dispatch, SH_NOATTRIB, false, void *, const CCommand &);
    10.8 +SH_DECL_EXTERN2_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommandContext &, const CCommand &);
    10.9  #elif SOURCE_ENGINE >= SE_ORANGEBOX
   10.10  SH_DECL_EXTERN1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &);
   10.11  #elif SOURCE_ENGINE == SE_DARKMESSIAH
   10.12 @@ -208,7 +208,7 @@
   10.13  }
   10.14  
   10.15  #if SOURCE_ENGINE == SE_DOTA
   10.16 -void CmdChangeLevelCallback(void *pUnknown, const CCommand &command)
   10.17 +void CmdChangeLevelCallback(const CCommandContext &context, const CCommand &command)
   10.18  {
   10.19  #elif SOURCE_ENGINE >= SE_ORANGEBOX
   10.20  void CmdChangeLevelCallback(const CCommand &command)
    11.1 --- a/core/NextMap.h	Wed Jul 10 20:46:00 2013 -0400
    11.2 +++ b/core/NextMap.h	Fri Jul 12 02:31:41 2013 -0400
    11.3 @@ -59,7 +59,7 @@
    11.4  };
    11.5  
    11.6  #if SOURCE_ENGINE == SE_DOTA
    11.7 -void CmdChangeLevelCallback(void *pUnknown, const CCommand &command);
    11.8 +void CmdChangeLevelCallback(const CCommandContext &context, const CCommand &command);
    11.9  #elif SOURCE_ENGINE >= SE_ORANGEBOX
   11.10  void CmdChangeLevelCallback(const CCommand &command);
   11.11  #else
   11.12 @@ -72,7 +72,7 @@
   11.13  	NextMapManager();
   11.14  
   11.15  #if SOURCE_ENGINE == SE_DOTA
   11.16 -	friend void CmdChangeLevelCallback(void *pUnknown, const CCommand &command);
   11.17 +	friend void CmdChangeLevelCallback(const CCommandContext &context, const CCommand &command);
   11.18  #elif SOURCE_ENGINE >= SE_ORANGEBOX
   11.19  	friend void CmdChangeLevelCallback(const CCommand &command);
   11.20  #else
    12.1 --- a/core/PlayerManager.cpp	Wed Jul 10 20:46:00 2013 -0400
    12.2 +++ b/core/PlayerManager.cpp	Fri Jul 12 02:31:41 2013 -0400
    12.3 @@ -59,11 +59,11 @@
    12.4  List<ICommandTargetProcessor *> target_processors;
    12.5  
    12.6  #if SOURCE_ENGINE == SE_DOTA
    12.7 -SH_DECL_HOOK5(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, int, const char *, const char *, char *, int);
    12.8 -SH_DECL_HOOK2_void(IServerGameClients, ClientPutInServer, SH_NOATTRIB, 0, int, const char *);
    12.9 -SH_DECL_HOOK1_void(IServerGameClients, ClientDisconnect, SH_NOATTRIB, 0, int);
   12.10 -SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, int, const CCommand &);
   12.11 -SH_DECL_HOOK1_void(IServerGameClients, ClientSettingsChanged, SH_NOATTRIB, 0, int);
   12.12 +SH_DECL_HOOK5(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, CEntityIndex, const char *, const char *, char *, int);
   12.13 +SH_DECL_HOOK2_void(IServerGameClients, ClientPutInServer, SH_NOATTRIB, 0, CEntityIndex, const char *);
   12.14 +SH_DECL_HOOK1_void(IServerGameClients, ClientDisconnect, SH_NOATTRIB, 0, CEntityIndex);
   12.15 +SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, CEntityIndex, const CCommand &);
   12.16 +SH_DECL_HOOK1_void(IServerGameClients, ClientSettingsChanged, SH_NOATTRIB, 0, CEntityIndex);
   12.17  #else
   12.18  SH_DECL_HOOK5(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, edict_t *, const char *, const char *, char *, int);
   12.19  SH_DECL_HOOK2_void(IServerGameClients, ClientPutInServer, SH_NOATTRIB, 0, edict_t *, const char *);
   12.20 @@ -83,7 +83,7 @@
   12.21  #endif
   12.22  
   12.23  #if SOURCE_ENGINE == SE_DOTA
   12.24 -SH_DECL_EXTERN2_void(ConCommand, Dispatch, SH_NOATTRIB, false, void *, const CCommand &);
   12.25 +SH_DECL_EXTERN2_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommandContext &, const CCommand &);
   12.26  #elif SOURCE_ENGINE >= SE_ORANGEBOX
   12.27  SH_DECL_EXTERN1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &);
   12.28  #elif SOURCE_ENGINE == SE_DARKMESSIAH
   12.29 @@ -470,8 +470,9 @@
   12.30  }
   12.31  
   12.32  #if SOURCE_ENGINE == SE_DOTA
   12.33 -bool PlayerManager::OnClientConnect(int client, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen)
   12.34 +bool PlayerManager::OnClientConnect(CEntityIndex index, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen)
   12.35  {
   12.36 +	int client = index.Get();
   12.37  	edict_t *pEntity = PEntityOfEntIndex(client);
   12.38  #else
   12.39  bool PlayerManager::OnClientConnect(edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen)
   12.40 @@ -535,8 +536,9 @@
   12.41  }
   12.42  
   12.43  #if SOURCE_ENGINE == SE_DOTA
   12.44 -bool PlayerManager::OnClientConnect_Post(int client, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen)
   12.45 +bool PlayerManager::OnClientConnect_Post(CEntityIndex index, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen)
   12.46  {
   12.47 +	int client = index.Get();
   12.48  	edict_t *pEntity = PEntityOfEntIndex(client);
   12.49  #else
   12.50  bool PlayerManager::OnClientConnect_Post(edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen)
   12.51 @@ -581,8 +583,9 @@
   12.52  }
   12.53  
   12.54  #if SOURCE_ENGINE == SE_DOTA
   12.55 -void PlayerManager::OnClientPutInServer(int client, const char *playername)
   12.56 +void PlayerManager::OnClientPutInServer(CEntityIndex index, const char *playername)
   12.57  {
   12.58 +	int client = index.Get();
   12.59  	edict_t *pEntity = PEntityOfEntIndex(client);
   12.60  #else
   12.61  void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername)
   12.62 @@ -763,8 +766,9 @@
   12.63  }
   12.64  
   12.65  #if SOURCE_ENGINE == SE_DOTA
   12.66 -void PlayerManager::OnClientDisconnect(int client)
   12.67 +void PlayerManager::OnClientDisconnect(CEntityIndex index)
   12.68  {
   12.69 +	int client = index.Get();
   12.70  	edict_t *pEntity = PEntityOfEntIndex(client);
   12.71  #else
   12.72  void PlayerManager::OnClientDisconnect(edict_t *pEntity)
   12.73 @@ -808,8 +812,9 @@
   12.74  }
   12.75  
   12.76  #if SOURCE_ENGINE == SE_DOTA
   12.77 -void PlayerManager::OnClientDisconnect_Post(int client)
   12.78 +void PlayerManager::OnClientDisconnect_Post(CEntityIndex index)
   12.79  {
   12.80 +	int client = index.Get();
   12.81  	edict_t *pEntity = PEntityOfEntIndex(client);
   12.82  #else
   12.83  void PlayerManager::OnClientDisconnect_Post(edict_t *pEntity)
   12.84 @@ -850,7 +855,7 @@
   12.85  	}
   12.86  
   12.87  #if SOURCE_ENGINE == SE_DOTA
   12.88 -	engine->ClientPrintf(IndexOfEdict(e), buffer);
   12.89 +	engine->ClientPrintf(CEntityIndex(IndexOfEdict(e)), buffer);
   12.90  #else
   12.91  	engine->ClientPrintf(e, buffer);
   12.92  #endif
   12.93 @@ -1017,8 +1022,9 @@
   12.94  }
   12.95  
   12.96  #if SOURCE_ENGINE == SE_DOTA
   12.97 -void PlayerManager::OnClientCommand(int client, const CCommand &args)
   12.98 +void PlayerManager::OnClientCommand(CEntityIndex index, const CCommand &args)
   12.99  {
  12.100 +	int client = index.Get();
  12.101  	edict_t *pEntity = PEntityOfEntIndex(client);
  12.102  #elif SOURCE_ENGINE >= SE_ORANGEBOX
  12.103  void PlayerManager::OnClientCommand(edict_t *pEntity, const CCommand &args)
  12.104 @@ -1141,8 +1147,9 @@
  12.105  }
  12.106  
  12.107  #if SOURCE_ENGINE == SE_DOTA
  12.108 -void PlayerManager::OnClientSettingsChanged(int client)
  12.109 +void PlayerManager::OnClientSettingsChanged(CEntityIndex index)
  12.110  {
  12.111 +	int client = index.Get();
  12.112  	edict_t *pEntity = PEntityOfEntIndex(client);
  12.113  #else
  12.114  void PlayerManager::OnClientSettingsChanged(edict_t *pEntity)
  12.115 @@ -1805,7 +1812,7 @@
  12.116  }
  12.117  
  12.118  #if SOURCE_ENGINE == SE_DOTA
  12.119 -void CmdMaxplayersCallback(void *pUnknown, const CCommand &command)
  12.120 +void CmdMaxplayersCallback(const CCommandContext &context, const CCommand &command)
  12.121  {
  12.122  #elif SOURCE_ENGINE >= SE_ORANGEBOX
  12.123  void CmdMaxplayersCallback(const CCommand &command)
    13.1 --- a/core/PlayerManager.h	Wed Jul 10 20:46:00 2013 -0400
    13.2 +++ b/core/PlayerManager.h	Fri Jul 12 02:31:41 2013 -0400
    13.3 @@ -152,14 +152,14 @@
    13.4  	void ClearAllAdmins();
    13.5  public:
    13.6  #if SOURCE_ENGINE == SE_DOTA
    13.7 -	bool OnClientConnect(int client, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen);
    13.8 -	bool OnClientConnect_Post(int client, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen);
    13.9 -	void OnClientPutInServer(int client, char const *playername);
   13.10 -	void OnClientDisconnect(int client);
   13.11 -	void OnClientDisconnect_Post(int client);
   13.12 -	void OnClientCommand(int client, const CCommand &args);
   13.13 -	void OnClientSettingsChanged(int client);
   13.14 -	//void OnClientSettingsChanged_Pre(int client);
   13.15 +	bool OnClientConnect(CEntityIndex index, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen);
   13.16 +	bool OnClientConnect_Post(CEntityIndex index, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen);
   13.17 +	void OnClientPutInServer(CEntityIndex index, char const *playername);
   13.18 +	void OnClientDisconnect(CEntityIndex index);
   13.19 +	void OnClientDisconnect_Post(CEntityIndex index);
   13.20 +	void OnClientCommand(CEntityIndex index, const CCommand &args);
   13.21 +	void OnClientSettingsChanged(CEntityIndex index);
   13.22 +	//void OnClientSettingsChanged_Pre(CEntityIndex client);
   13.23  #else
   13.24  	bool OnClientConnect(edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen);
   13.25  	bool OnClientConnect_Post(edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen);
   13.26 @@ -247,7 +247,7 @@
   13.27  };
   13.28  
   13.29  #if SOURCE_ENGINE == SE_DOTA
   13.30 -void CmdMaxplayersCallback(void *, const CCommand &command);
   13.31 +void CmdMaxplayersCallback(const CCommandContext &context, const CCommand &command);
   13.32  #elif SOURCE_ENGINE >= SE_ORANGEBOX
   13.33  void CmdMaxplayersCallback(const CCommand &command);
   13.34  #else
    14.1 --- a/core/convar_sm_dota.h	Wed Jul 10 20:46:00 2013 -0400
    14.2 +++ b/core/convar_sm_dota.h	Fri Jul 12 02:31:41 2013 -0400
    14.3 @@ -49,6 +49,22 @@
    14.4  class ConCommandBase;
    14.5  struct characterset_t;
    14.6  
    14.7 +struct CCommandContext
    14.8 +{
    14.9 +	CCommandContext( int index )
   14.10 +	{
   14.11 +		_index = index;
   14.12 +	}
   14.13 +	
   14.14 +	int Get() const
   14.15 +	{
   14.16 +		return _index;
   14.17 +	}
   14.18 +	
   14.19 +private:
   14.20 +	int _index;
   14.21 +};
   14.22 +
   14.23  
   14.24  
   14.25  //-----------------------------------------------------------------------------
   14.26 @@ -76,7 +92,7 @@
   14.27  // Called when a ConCommand needs to execute
   14.28  //-----------------------------------------------------------------------------
   14.29  typedef void ( *FnCommandCallbackV1_t )( void );
   14.30 -typedef void ( *FnCommandCallback_t )( void *pUnknown, const CCommand &command );
   14.31 +typedef void ( *FnCommandCallback_t )( const CCommandContext &context, const CCommand &command );
   14.32  
   14.33  #define COMMAND_COMPLETION_MAXITEMS		64
   14.34  #define COMMAND_COMPLETION_ITEM_LENGTH	64
   14.35 @@ -99,7 +115,7 @@
   14.36  class ICommandCallback2
   14.37  {
   14.38  public:
   14.39 -	virtual void CommandCallback( void *pUnknown, const CCommand &command ) = 0;
   14.40 +	virtual void CommandCallback( const CCommandContext &context, const CCommand &command ) = 0;
   14.41  };
   14.42  
   14.43  class ICommandCompletionCallback
   14.44 @@ -307,7 +323,7 @@
   14.45  	virtual bool CanAutoComplete( void );
   14.46  
   14.47  	// Invoke the function
   14.48 -	virtual void Dispatch( void *pUnknown, const CCommand &command );
   14.49 +	virtual void Dispatch( const CCommandContext &context, const CCommand &command );
   14.50  
   14.51  private:
   14.52  	// NOTE: To maintain backward compat, we have to be very careful:
   14.53 @@ -962,71 +978,71 @@
   14.54  // Purpose: Utility macros to quicky generate a simple console command
   14.55  //-----------------------------------------------------------------------------
   14.56  #define CON_COMMAND( name, description ) \
   14.57 -   static void name( void *pUnknown, const CCommand &args ); \
   14.58 +   static void name( const CCommandContext &context, const CCommand &args ); \
   14.59     static ConCommand name##_command( #name, name, description ); \
   14.60 -   static void name( void *pUnknown, const CCommand &args )
   14.61 +   static void name( const CCommandContext &context, const CCommand &args )
   14.62  
   14.63  #ifdef CLIENT_DLL
   14.64  	#define CON_COMMAND_SHARED( name, description ) \
   14.65 -		static void name( void *pUnknown, const CCommand &args ); \
   14.66 +		static void name( const CCommandContext &context, const CCommand &args ); \
   14.67  		static ConCommand name##_command_client( #name "_client", name, description ); \
   14.68 -		static void name( void *pUnknown, const CCommand &args )
   14.69 +		static void name( const CCommandContext &context, const CCommand &args )
   14.70  #else
   14.71  	#define CON_COMMAND_SHARED( name, description ) \
   14.72 -		static void name( void *pUnknown, const CCommand &args ); \
   14.73 +		static void name( const CCommandContext &context, const CCommand &args ); \
   14.74  		static ConCommand name##_command( #name, name, description ); \
   14.75 -		static void name( void *pUnknown, const CCommand &args )
   14.76 +		static void name( const CCommandContext &context, const CCommand &args )
   14.77  #endif
   14.78  
   14.79  
   14.80  #define CON_COMMAND_F( name, description, flags ) \
   14.81 -	static void name( void *pUnknown, const CCommand &args ); \
   14.82 +	static void name( const CCommandContext &context, const CCommand &args ); \
   14.83  	static ConCommand name##_command( #name, name, description, flags ); \
   14.84 -	static void name( void *pUnknown, const CCommand &args )
   14.85 +	static void name( const CCommandContext &context, const CCommand &args )
   14.86  
   14.87  #ifdef CLIENT_DLL
   14.88  	#define CON_COMMAND_F_SHARED( name, description, flags ) \
   14.89 -		static void name( void *pUnknown, const CCommand &args ); \
   14.90 +		static void name( const CCommandContext &context, const CCommand &args ); \
   14.91  		static ConCommand name##_command_client( #name "_client", name, description, flags ); \
   14.92 -		static void name( void *pUnknown, const CCommand &args )
   14.93 +		static void name( const CCommandContext &context, const CCommand &args )
   14.94  #else
   14.95  	#define CON_COMMAND_F_SHARED( name, description, flags ) \
   14.96 -		static void name( void *pUnknown, const CCommand &args ); \
   14.97 +		static void name( const CCommandContext &context, const CCommand &args ); \
   14.98  		static ConCommand name##_command( #name, name, description, flags ); \
   14.99 -		static void name( void *pUnknown, const CCommand &args )
  14.100 +		static void name( const CCommandContext &context, const CCommand &args )
  14.101  #endif
  14.102  
  14.103  
  14.104  #define CON_COMMAND_F_COMPLETION( name, description, flags, completion ) \
  14.105 -	static void name( void *pUnknown, const CCommand &args ); \
  14.106 +	static void name( const CCommandContext &context, const CCommand &args ); \
  14.107  	static ConCommand name##_command( #name, name, description, flags, completion ); \
  14.108 -	static void name( void *pUnknown, const CCommand &args )
  14.109 +	static void name( const CCommandContext &context, const CCommand &args )
  14.110  
  14.111  #ifdef CLIENT_DLL
  14.112  	#define CON_COMMAND_F_COMPLETION_SHARED( name, description, flags, completion ) \
  14.113 -		static void name( void *pUnknown, const CCommand &args ); \
  14.114 +		static void name( const CCommandContext &context, const CCommand &args ); \
  14.115  		static ConCommand name##_command_client( #name "_client", name, description, flags, completion ); \
  14.116 -		static void name( void *pUnknown, const CCommand &args )
  14.117 +		static void name( const CCommandContext &context, const CCommand &args )
  14.118  #else
  14.119  	#define CON_COMMAND_F_COMPLETION_SHARED( name, description, flags, completion ) \
  14.120 -		static void name( void *pUnknown, const CCommand &args ); \
  14.121 +		static void name( const CCommandContext &context, const CCommand &args ); \
  14.122  		static ConCommand name##_command( #name, name, description, flags, completion ); \
  14.123 -		static void name( void *pUnknown, const CCommand &args )
  14.124 +		static void name( const CCommandContext &context, const CCommand &args )
  14.125  #endif
  14.126  
  14.127  
  14.128  #define CON_COMMAND_EXTERN( name, _funcname, description ) \
  14.129 -	void _funcname( void *pUnknown, const CCommand &args ); \
  14.130 +	void _funcname( const CCommandContext &context, const CCommand &args ); \
  14.131  	static ConCommand name##_command( #name, _funcname, description ); \
  14.132 -	void _funcname( void *pUnknown, const CCommand &args )
  14.133 +	void _funcname( const CCommandContext &context, const CCommand &args )
  14.134  
  14.135  #define CON_COMMAND_EXTERN_F( name, _funcname, description, flags ) \
  14.136 -	void _funcname( void *pUnknown, const CCommand &args ); \
  14.137 +	void _funcname( const CCommandContext &context, const CCommand &args ); \
  14.138  	static ConCommand name##_command( #name, _funcname, description, flags ); \
  14.139 -	void _funcname( void *pUnknown, const CCommand &args )
  14.140 +	void _funcname( const CCommandContext &context, const CCommand &args )
  14.141  
  14.142  #define CON_COMMAND_MEMBER_F( _thisclass, name, _funcname, description, flags ) \
  14.143 -	void _funcname( void *pUnknown, const CCommand &args );						\
  14.144 +	void _funcname( const CCommandContext &context, const CCommand &args );						\
  14.145  	friend class CCommandMemberInitializer_##_funcname;			\
  14.146  	class CCommandMemberInitializer_##_funcname					\
  14.147  	{															\
    15.1 --- a/core/smn_halflife.cpp	Wed Jul 10 20:46:00 2013 -0400
    15.2 +++ b/core/smn_halflife.cpp	Fri Jul 12 02:31:41 2013 -0400
    15.3 @@ -103,8 +103,7 @@
    15.4  	pContext->LocalToString(params[1], &netname);
    15.5  
    15.6  #if SOURCE_ENGINE == SE_DOTA
    15.7 -	int index;
    15.8 -	engine->CreateFakeClient(&index, netname);
    15.9 +	int index = engine->CreateFakeClient(netname).Get();
   15.10  	
   15.11  	if (index == -1)
   15.12  	{
    16.1 --- a/core/smn_usermsgs.cpp	Wed Jul 10 20:46:00 2013 -0400
    16.2 +++ b/core/smn_usermsgs.cpp	Fri Jul 12 02:31:41 2013 -0400
    16.3 @@ -270,7 +270,7 @@
    16.4  	{
    16.5  		int index;
    16.6  #if SOURCE_ENGINE == SE_DOTA
    16.7 -		pFilter->GetRecipientIndex(&index, i);
    16.8 +		index = pFilter->GetRecipientIndex(i).Get();
    16.9  #else
   16.10  		index = pFilter->GetRecipientIndex(i);
   16.11  #endif
    17.1 --- a/extensions/sdktools/CellRecipientFilter.h	Wed Jul 10 20:46:00 2013 -0400
    17.2 +++ b/extensions/sdktools/CellRecipientFilter.h	Fri Jul 12 02:31:41 2013 -0400
    17.3 @@ -45,7 +45,7 @@
    17.4  	bool IsInitMessage() const;
    17.5  	int GetRecipientCount() const;
    17.6  #if SOURCE_ENGINE == SE_DOTA
    17.7 -	void GetRecipientIndex(int *clientIndex, int slot) const;
    17.8 +	CEntityIndex GetRecipientIndex(int slot) const;
    17.9  #else
   17.10  	int GetRecipientIndex(int slot) const;
   17.11  #endif
   17.12 @@ -84,7 +84,7 @@
   17.13  }
   17.14  
   17.15  #if SOURCE_ENGINE == SE_DOTA
   17.16 -inline void CellRecipientFilter::GetRecipientIndex(int *clientIndex, int slot) const
   17.17 +inline CEntityIndex CellRecipientFilter::GetRecipientIndex(int slot) const
   17.18  #else
   17.19  inline int CellRecipientFilter::GetRecipientIndex(int slot) const
   17.20  #endif
   17.21 @@ -97,7 +97,7 @@
   17.22  	ret = static_cast<int>(m_Players[slot]);
   17.23  
   17.24  #if SOURCE_ENGINE == SE_DOTA
   17.25 -	*clientIndex = ret;
   17.26 +	return CEntityIndex(ret);
   17.27  #else
   17.28  	return ret;
   17.29  #endif
    18.1 --- a/extensions/sdktools/extension.h	Wed Jul 10 20:46:00 2013 -0400
    18.2 +++ b/extensions/sdktools/extension.h	Fri Jul 12 02:31:41 2013 -0400
    18.3 @@ -94,7 +94,7 @@
    18.4  	bool OnSetClientListening(int iReceiver, int iSender, bool bListen);
    18.5  	void VoiceInit();
    18.6  #if SOURCE_ENGINE == SE_DOTA
    18.7 -	void OnClientCommand(int client, const CCommand &args);
    18.8 +	void OnClientCommand(CEntityIndex index, const CCommand &args);
    18.9  #elif SOURCE_ENGINE >= SE_ORANGEBOX
   18.10  	void OnClientCommand(edict_t *pEntity, const CCommand &args);
   18.11  #else
    19.1 --- a/extensions/sdktools/tenatives.cpp	Wed Jul 10 20:46:00 2013 -0400
    19.2 +++ b/extensions/sdktools/tenatives.cpp	Fri Jul 12 02:31:41 2013 -0400
    19.3 @@ -140,7 +140,7 @@
    19.4  	{
    19.5  		int index;
    19.6  #if SOURCE_ENGINE == SE_DOTA
    19.7 -		pFilter->GetRecipientIndex(&index, i);
    19.8 +		index = pFilter->GetRecipientIndex(i).Get();
    19.9  #else
   19.10  		index = pFilter->GetRecipientIndex(i);
   19.11  #endif
    20.1 --- a/extensions/sdktools/voice.cpp	Wed Jul 10 20:46:00 2013 -0400
    20.2 +++ b/extensions/sdktools/voice.cpp	Fri Jul 12 02:31:41 2013 -0400
    20.3 @@ -59,7 +59,7 @@
    20.4  SH_DECL_HOOK3(IVoiceServer, SetClientListening, SH_NOATTRIB, 0, bool, int, int, bool);
    20.5  
    20.6  #if SOURCE_ENGINE == SE_DOTA
    20.7 -SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, int, const CCommand &);
    20.8 +SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, CEntityIndex, const CCommand &);
    20.9  #elif SOURCE_ENGINE >= SE_ORANGEBOX
   20.10  SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t *, const CCommand &);
   20.11  #else
   20.12 @@ -94,8 +94,9 @@
   20.13  }
   20.14  
   20.15  #if SOURCE_ENGINE == SE_DOTA
   20.16 -void SDKTools::OnClientCommand(int client, const CCommand &args)
   20.17 +void SDKTools::OnClientCommand(CEntityIndex index, const CCommand &args)
   20.18  {
   20.19 +	int client = index.Get();
   20.20  #elif SOURCE_ENGINE >= SE_ORANGEBOX
   20.21  void SDKTools::OnClientCommand(edict_t *pEntity, const CCommand &args)
   20.22  {
    21.1 --- a/extensions/sdktools/vsound.cpp	Wed Jul 10 20:46:00 2013 -0400
    21.2 +++ b/extensions/sdktools/vsound.cpp	Fri Jul 12 02:31:41 2013 -0400
    21.3 @@ -32,7 +32,12 @@
    21.4  #include "vsound.h"
    21.5  #include <IForwardSys.h>
    21.6  
    21.7 +#if SOURCE_ENGINE == SE_DOTA
    21.8 +SH_DECL_HOOK8_void(IVEngineServer, EmitAmbientSound, SH_NOATTRIB, 0, CEntityIndex, const Vector &, const char *, float, soundlevel_t, int, int, float);
    21.9 +#else
   21.10  SH_DECL_HOOK8_void(IVEngineServer, EmitAmbientSound, SH_NOATTRIB, 0, int, const Vector &, const char *, float, soundlevel_t, int, int, float);
   21.11 +#endif
   21.12 +
   21.13  #if SOURCE_ENGINE >= SE_PORTAL2
   21.14  SH_DECL_HOOK17(IEngineSound, EmitSound, SH_NOATTRIB, 0, int, IRecipientFilter &, int, int, const char *, unsigned int, const char *, float, float, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
   21.15  SH_DECL_HOOK17(IEngineSound, EmitSound, SH_NOATTRIB, 1, int, IRecipientFilter &, int, int, const char *, unsigned int, const char *, float, soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
   21.16 @@ -70,7 +75,7 @@
   21.17  	{
   21.18  		int index;
   21.19  #if SOURCE_ENGINE == SE_DOTA
   21.20 -		pFilter->GetRecipientIndex(&index, i);
   21.21 +		index = pFilter->GetRecipientIndex(i).Get();
   21.22  #else
   21.23  		index = pFilter->GetRecipientIndex(i);
   21.24  #endif
   21.25 @@ -221,9 +226,16 @@
   21.26  	return false;
   21.27  }
   21.28  
   21.29 +#if SOURCE_ENGINE == SE_DOTA
   21.30 +void SoundHooks::OnEmitAmbientSound(CEntityIndex index, const Vector &pos, const char *samp, float vol, 
   21.31 +									soundlevel_t soundlevel, int fFlags, int pitch, float delay)
   21.32 +{
   21.33 +	int entindex = index.Get();
   21.34 +#else
   21.35  void SoundHooks::OnEmitAmbientSound(int entindex, const Vector &pos, const char *samp, float vol, 
   21.36  									soundlevel_t soundlevel, int fFlags, int pitch, float delay)
   21.37  {
   21.38 +#endif
   21.39  	SoundHookIter iter;
   21.40  	IPluginFunction *pFunc;
   21.41  	cell_t vec[3] = {sp_ftoc(pos.x), sp_ftoc(pos.y), sp_ftoc(pos.z)};
   21.42 @@ -259,8 +271,13 @@
   21.43  				vec2.x = sp_ctof(vec[0]);
   21.44  				vec2.y = sp_ctof(vec[1]);
   21.45  				vec2.z = sp_ctof(vec[2]);
   21.46 +#if SOURCE_ENGINE == SE_DOTA
   21.47  				RETURN_META_NEWPARAMS(MRES_IGNORED, &IVEngineServer::EmitAmbientSound, 
   21.48 +										(CEntityIndex(entindex), vec2, buffer, vol, soundlevel, fFlags, pitch, delay));
   21.49 +#else
   21.50 +				RETURN_META_NEWPARAMS(MRES_IGNORED, &IVEngineServer::EmitAmbientSound,
   21.51  										(entindex, vec2, buffer, vol, soundlevel, fFlags, pitch, delay));
   21.52 +#endif
   21.53  			}
   21.54  		}
   21.55  	}
    22.1 --- a/extensions/sdktools/vsound.h	Wed Jul 10 20:46:00 2013 -0400
    22.2 +++ b/extensions/sdktools/vsound.h	Fri Jul 12 02:31:41 2013 -0400
    22.3 @@ -50,8 +50,14 @@
    22.4  	void Shutdown();
    22.5  	void AddHook(int type, IPluginFunction *pFunc);
    22.6  	bool RemoveHook(int type, IPluginFunction *pFunc);
    22.7 +
    22.8 +#if SOURCE_ENGINE == SE_DOTA
    22.9 +	void OnEmitAmbientSound(CEntityIndex index, const Vector &pos, const char *samp, float vol, soundlevel_t soundlevel, int fFlags, int pitch, float delay);
   22.10 +#else
   22.11 +	void OnEmitAmbientSound(int entindex, const Vector &pos, const char *samp, float vol, soundlevel_t soundlevel, int fFlags, int pitch, float delay);
   22.12 +#endif
   22.13 +
   22.14  #if SOURCE_ENGINE >= SE_PORTAL2
   22.15 -	void OnEmitAmbientSound(int entindex, const Vector &pos, const char *samp, float vol, soundlevel_t soundlevel, int fFlags, int pitch, float delay);
   22.16  	int OnEmitSound(IRecipientFilter& filter, int iEntIndex, int iChannel, const char *, unsigned int, const char *pSample, float flVolume, 
   22.17  		soundlevel_t iSoundlevel, int nSeed, int iFlags, int iPitch, const Vector *pOrigin, 
   22.18  		const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions, 
   22.19 @@ -61,8 +67,6 @@
   22.20  		const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions, 
   22.21  		float soundtime, int speakerentity);
   22.22  #else
   22.23 -	void OnEmitAmbientSound(int entindex, const Vector &pos, const char *samp, float vol, 
   22.24 -		soundlevel_t soundlevel, int fFlags, int pitch, float delay);
   22.25  #if SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
   22.26  	
   22.27  	void OnEmitSound(IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSample, float flVolume,