[iortcw] 46/89: All: Add range check for bot skill in addbot command
Simon McVittie
smcv at debian.org
Fri Sep 8 10:44:24 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to tag 1.51b
in repository iortcw.
commit 60ae34dea206060fc24c633afb4c126748d65c11
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date: Wed Jul 19 12:30:03 2017 -0400
All: Add range check for bot skill in addbot command
---
MP/code/game/g_bot.c | 2 +-
SP/code/game/g_bot.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/MP/code/game/g_bot.c b/MP/code/game/g_bot.c
index 9eb4367..8f9235e 100644
--- a/MP/code/game/g_bot.c
+++ b/MP/code/game/g_bot.c
@@ -666,7 +666,7 @@ void Svcmd_AddBot_f( void ) {
if ( !string[0] ) {
skill = 4;
} else {
- skill = atoi( string );
+ skill = Com_Clamp( 1, 5, atoi( string ) );
}
// team
diff --git a/SP/code/game/g_bot.c b/SP/code/game/g_bot.c
index 239ceda..cb8fbad 100644
--- a/SP/code/game/g_bot.c
+++ b/SP/code/game/g_bot.c
@@ -667,7 +667,7 @@ void Svcmd_AddBot_f( void ) {
if ( !string[0] ) {
skill = 4;
} else {
- skill = atoi( string );
+ skill = Com_Clamp( 1, 5, atoi( string ) );
}
// team
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git
More information about the Pkg-games-commits
mailing list