From b984dd4a234da326ff50fdaa3f8d38516f4fd98b Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Thu, 29 Jun 2017 19:22:25 -0500 Subject: [PATCH] Add range check for bot skill in addbot command Adding a bot with skill of 0 doesn't show icon on hud. --- code/game/g_bot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/g_bot.c b/code/game/g_bot.c index 66c9ae34..af4906a3 100644 --- a/code/game/g_bot.c +++ b/code/game/g_bot.c @@ -772,7 +772,7 @@ void Svcmd_AddBot_f( void ) { skill = 4; } else { - skill = atof( string ); + skill = Com_Clamp( 1, 5, atof( string ) ); } // team