diff options
author | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-10-06 14:17:12 +0000 |
---|---|---|
committer | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-10-06 14:17:12 +0000 |
commit | 7e8ddab97749d930eb1d3682be61a331955a48d9 (patch) | |
tree | 40e7c984bc89ca13cca7621c12dee95307d11d5f /code/q3_ui/ui_startserver.c | |
parent | 95ceee2a54ae242af4d55c128e5fa831c5ccb81b (diff) | |
download | ioquake3-aero-7e8ddab97749d930eb1d3682be61a331955a48d9.tar.gz ioquake3-aero-7e8ddab97749d930eb1d3682be61a331955a48d9.zip |
Fix bot loading in case player supplied invalid bot names
git-svn-id: svn://svn.icculus.org/quake3/trunk@1645 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/q3_ui/ui_startserver.c')
-rw-r--r-- | code/q3_ui/ui_startserver.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/code/q3_ui/ui_startserver.c b/code/q3_ui/ui_startserver.c index ddb2533..2c56a10 100644 --- a/code/q3_ui/ui_startserver.c +++ b/code/q3_ui/ui_startserver.c @@ -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]) ); |