Oh I see. It occurs only when detailnames are off. I bet I know where this bug is, then.
Line 330 of bot.cpp
change
Code:
strncpy (c_name, bot_name, 32);
to
Code:
strncpy (c_name, szBotNames[name_index], 32);
My bad.
*edit* didn't see how late I was... sPlOrYgOn already fixed the bug. Congrats mate
*EDIT 2*
While I'm here, I've just caught another one on the fly.
Would you mind changing:
Code:
// a name has been given
else
{
// If Detailnames are on, attach Clan Tag
if (g_bDetailNames)
{
if (iPersonality == 0)
sprintf (c_name, "[POD]%s (%d)", bot_name, skill);
else if (iPersonality == 1)
sprintf (c_name, "[P*D]%s (%d)", bot_name, skill);
else
sprintf (c_name, "[P0D]%s (%d)", bot_name, skill);
}
else
strncpy (c_name, bot_name, 32);
}
to
Code:
// a name has been given
else
{
// If Detailnames are on, see if we NEED to attach Clan Tag
if (g_bDetailNames)
{
if ((strstr (bot_name, "[POD]") != NULL)
|| (strstr (bot_name, "[P*D]") != NULL)
|| (strstr (bot_name, "[P0D]") != NULL))
{
strncpy (c_name, bot_name, 32);
if (iPersonality == 0)
c_name[2] = 'O';
else if (iPersonality == 1)
c_name[2] = '*';
else
c_name[2] = '0';
}
else
{
if (iPersonality == 0)
sprintf (c_name, "[POD]%s (%d)", bot_name, skill);
else if (iPersonality == 1)
sprintf (c_name, "[P*D]%s (%d)", bot_name, skill);
else
sprintf (c_name, "[P0D]%s (%d)", bot_name, skill);
}
}
else
strncpy (c_name, bot_name, 32);
}
this is to avoid bots called [POD][P0D][P*D]bot_name (80) (96) (77)" after several map changes.
*EDIT 3* ....and yet another one to display the new personality tags correctly. yee-haw.
*EDIT 4* I should test my bugfixes too before submitting them. :o This one compile correctly now.
It would probably be cleaner to set the clan tags directly in the BotCreateTab, BEFORE calling BotCreate(), and to define the bot personality there. I'll let this up to you