diff --git a/code/game/g_bot.c b/code/game/g_bot.c index 6ee369a3..9b7714a5 100644 --- a/code/game/g_bot.c +++ b/code/game/g_bot.c @@ -580,6 +580,7 @@ static void G_AddBot( const char *name, float skill, const char *team, int delay botinfo = G_GetBotInfoByName( name ); if ( !botinfo ) { G_Printf( S_COLOR_RED "Error: Bot '%s' not defined\n", name ); + trap_BotFreeClient( clientNum ); return; } @@ -651,6 +652,7 @@ static void G_AddBot( const char *name, float skill, const char *team, int delay s = Info_ValueForKey(botinfo, "aifile"); if (!*s ) { trap_Print( S_COLOR_RED "Error: bot has no aifile specified\n" ); + trap_BotFreeClient( clientNum ); return; } Info_SetValueForKey( userinfo, "characterfile", s );