core/smn_console.cpp
changeset 3913 a73cf1f26984
parent 3872 4c93f74cae51
child 3961 0dc477c29792
     1.1 --- a/core/smn_console.cpp	Mon May 13 14:19:17 2013 -0400
     1.2 +++ b/core/smn_console.cpp	Mon May 13 15:18:12 2013 -0400
     1.3 @@ -878,7 +878,11 @@
     1.4  
     1.5  	if (index != 0)
     1.6  	{
     1.7 +#if SOURCE_ENGINE == SE_DOTA
     1.8 +		engine->ClientPrintf(pPlayer->GetIndex(), buffer);
     1.9 +#else
    1.10  		engine->ClientPrintf(pPlayer->GetEdict(), buffer);
    1.11 +#endif
    1.12  	} else {
    1.13  		META_CONPRINT(buffer);
    1.14  	}
    1.15 @@ -1077,7 +1081,13 @@
    1.16  		return 0;
    1.17  	}
    1.18  
    1.19 -	engine->ClientCommand(pPlayer->GetEdict(), "%s", buffer);
    1.20 +	engine->ClientCommand(
    1.21 +#if SOURCE_ENGINE == SE_DOTA
    1.22 +		pPlayer->GetIndex(),
    1.23 +#else
    1.24 +		pPlayer->GetEdict(),
    1.25 +#endif
    1.26 +		"%s", buffer);
    1.27  
    1.28  	return 1;
    1.29  }
    1.30 @@ -1105,7 +1115,7 @@
    1.31  	}
    1.32  
    1.33  #if SOURCE_ENGINE == SE_DOTA
    1.34 -	engine->ClientCommand(pPlayer->GetEdict(), "%s", buffer);
    1.35 +	engine->ClientCommand(pPlayer->GetIndex(), "%s", buffer);
    1.36  #else
    1.37  	serverpluginhelpers->ClientCommand(pPlayer->GetEdict(), buffer);
    1.38  #endif
    1.39 @@ -1135,7 +1145,7 @@
    1.40  		return 0;
    1.41  	}
    1.42  
    1.43 -	g_HL2.AddToFakeCliCmdQueue(params[1], engine->GetPlayerUserId(pPlayer->GetEdict()), buffer);
    1.44 +	g_HL2.AddToFakeCliCmdQueue(params[1], GetPlayerUserId(pPlayer->GetEdict()), buffer);
    1.45  
    1.46  	return 1;
    1.47  }
    1.48 @@ -1182,7 +1192,11 @@
    1.49  	{
    1.50  		buffer[len++] = '\n';
    1.51  		buffer[len] = '\0';
    1.52 +#if SOURCE_ENGINE == SE_DOTA
    1.53 +		engine->ClientPrintf(pPlayer->GetIndex(), buffer);
    1.54 +#else
    1.55  		engine->ClientPrintf(pPlayer->GetEdict(), buffer);
    1.56 +#endif
    1.57  	} else if (replyto == SM_REPLY_CHAT) {
    1.58  		if (len >= 191)
    1.59  		{