core/ConCmdManager.cpp
changeset 1544 feff70182207
parent 1541 e46ad208b9b4
child 1584 8158e9eafff5
     1.1 --- a/core/ConCmdManager.cpp	Sun Oct 14 01:09:40 2007 +0000
     1.2 +++ b/core/ConCmdManager.cpp	Sun Oct 14 02:30:16 2007 +0000
     1.3 @@ -157,7 +157,12 @@
     1.4  {
     1.5  	CCommand command;
     1.6  #endif
     1.7 +
     1.8 +	g_HL2.PushCommandStack(&command);
     1.9 +
    1.10  	g_ConCmds.InternalDispatch(command);
    1.11 +
    1.12 +	g_HL2.PopCommandStack();
    1.13  }
    1.14  
    1.15  void ConCmdManager::SetCommandClient(int client)
    1.16 @@ -230,8 +235,7 @@
    1.17  	 * -- 
    1.18  	 * Whether or not it goes through the callback is determined by FCVAR_GAMEDLL
    1.19  	 */
    1.20 -	char cmd[300];
    1.21 -	strncopy(cmd, command.Arg(0), sizeof(cmd));
    1.22 +	const char *cmd = g_HL2.CurrentCommandName();
    1.23  
    1.24  	ConCmdInfo *pInfo;
    1.25  	if (!sm_trie_retrieve(m_pCmds, cmd, (void **)&pInfo))