This is an automated email from the git hooks/post-receive script. smcv pushed a commit to annotated tag debian/1.36+u20170908+dfsg1-1 in repository ioquake3.
commit f4d68590c24c93f53458cea581b3504970d0bcf2 Author: Zack Middleton <z...@cloemail.com> Date: Sat Sep 2 17:31:01 2017 -0500 Fix going to previous browser source in q3_ui It wasn't possible to go to previous source from favorites if sv_master5 cvar wasn't set. --- code/q3_ui/ui_servers2.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/code/q3_ui/ui_servers2.c b/code/q3_ui/ui_servers2.c index 93e4697..e709925 100644 --- a/code/q3_ui/ui_servers2.c +++ b/code/q3_ui/ui_servers2.c @@ -1102,15 +1102,22 @@ int ArenaServers_SetType( int type ) if(type >= UIAS_GLOBAL1 && type <= UIAS_GLOBAL5) { char masterstr[2], cvarname[sizeof("sv_master1")]; + int direction; - while(type <= UIAS_GLOBAL5) + if (type == g_servertype || type == ((g_servertype+1) % (ARRAY_LEN(master_items)-1))) { + direction = 1; + } else { + direction = -1; + } + + while(type >= UIAS_GLOBAL1 && type <= UIAS_GLOBAL5) { Com_sprintf(cvarname, sizeof(cvarname), "sv_master%d", type - UIAS_GLOBAL0); trap_Cvar_VariableStringBuffer(cvarname, masterstr, sizeof(masterstr)); if(*masterstr) break; - type++; + type += direction; } } -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git _______________________________________________ Pkg-games-commits mailing list Pkg-games-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits