*sid should be set _after_ clientconnect
This commit is contained in:
parent
ac8bf86c18
commit
5117831f34
2 changed files with 7 additions and 13 deletions
|
|
@ -1185,7 +1185,7 @@ void ClientCommand (edict_t *ent)
|
|||
{
|
||||
if (stricmp (command, "yapb") == 0 || stricmp (command, "yb") == 0)
|
||||
{
|
||||
int state = BotCommandHandler (ent, IsNullString (CMD_ARGV (1)) ? "help" : CMD_ARGV (1), CMD_ARGV (2), CMD_ARGV (3), CMD_ARGV (4), CMD_ARGV (5), CMD_ARGV (6), CMD_ARGV (0));
|
||||
int state = BotCommandHandler (ent, IsNullString (arg1) ? "help" : arg1, CMD_ARGV (2), CMD_ARGV (3), CMD_ARGV (4), CMD_ARGV (5), CMD_ARGV (6), CMD_ARGV (0));
|
||||
|
||||
switch (state)
|
||||
{
|
||||
|
|
@ -1193,10 +1193,6 @@ void ClientCommand (edict_t *ent)
|
|||
ClientPrint (ent, print_withtag, "Unknown command: %s", arg1);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
ClientPrint (ent, print_withtag, "CVar yb_%s, can be only set via RCON access.", CMD_ARGV (2));
|
||||
break;
|
||||
|
||||
case 2:
|
||||
ClientPrint (ent, print_withtag, "Command %s, can only be executed from server console.", arg1);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -755,17 +755,15 @@ Bot::Bot (edict_t *bot, int difficulty, int personality, int team, int member, c
|
|||
char *buffer = GET_INFOKEYBUFFER (bot);
|
||||
SET_CLIENT_KEYVALUE (clientIndex, buffer, "_vgui_menus", "0");
|
||||
|
||||
if (g_gameVersion != CSV_OLD)
|
||||
{
|
||||
if (yb_latency_display.GetInt () == 1)
|
||||
SET_CLIENT_KEYVALUE (clientIndex, buffer, "*bot", "1");
|
||||
|
||||
if (yb_avatar_display.GetBool () && !steamId.IsEmpty ())
|
||||
SET_CLIENT_KEYVALUE (clientIndex, buffer, "*sid", const_cast <char *> (steamId.GetBuffer ()));
|
||||
}
|
||||
if (g_gameVersion != CSV_OLD && yb_latency_display.GetInt () == 1)
|
||||
SET_CLIENT_KEYVALUE (clientIndex, buffer, "*bot", "1");
|
||||
|
||||
rejectReason[0] = 0; // reset the reject reason template string
|
||||
MDLL_ClientConnect (bot, "BOT", FormatBuffer ("127.0.0.%d", IndexOfEntity (bot) + 100), rejectReason);
|
||||
|
||||
// should be set after client connect
|
||||
if (yb_avatar_display.GetBool () && !steamId.IsEmpty ())
|
||||
SET_CLIENT_KEYVALUE (clientIndex, buffer, "*sid", const_cast <char *> (steamId.GetBuffer ()));
|
||||
|
||||
memset (&m_pingOffset, 0, sizeof (m_pingOffset));
|
||||
memset (&m_ping, 0, sizeof (m_ping));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue