Fix bot loading in case player supplied invalid bot names
This commit is contained in:
parent
de9cf465cc
commit
549f23bda6
2 changed files with 11 additions and 2 deletions
|
@ -1092,7 +1092,11 @@ static void ServerOptions_InitBotNames( void ) {
|
|||
*p++ = 0;
|
||||
}
|
||||
|
||||
botInfo = UI_GetBotInfoByName( bot );
|
||||
botInfo = UI_GetBotInfoByName( bot );
|
||||
if( !botInfo )
|
||||
{
|
||||
botInfo = UI_GetBotInfoByNumber( count );
|
||||
}
|
||||
bot = Info_ValueForKey( botInfo, "name" );
|
||||
|
||||
Q_strncpyz( s_serveroptions.playerNameBuffers[count], bot, sizeof(s_serveroptions.playerNameBuffers[count]) );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue