Bug 2786 - patch: non modal "server has to many xxx players"
Status: RESOLVED FIXED
Alias: None
Product: Tremulous
Classification: Unclassified
Component: Misc
Version: unspecified
Hardware: PC All
: P2 enhancement
Assignee: Tim Angus
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2006-07-19 10:20 EDT by rasz
Modified: 2006-12-29 13:22:37 EST
0 users

See Also:


Attachments
. (1.53 KB, patch)
2006-07-19 14:25 EDT, rasz
Rewritten CG_Menu() (20.72 KB, patch)
2006-07-24 04:44 EDT, Martin Doucha

Description rasz 2006-07-19 10:20:03 EDT
follow up tp http://tremulous.net/phpBB2/viewtopic.php?p=12345#12345 

if cg_disableWarningDialogs=1 shows only small info in chat window without modal popup forcing you to press OK.

PS: thit is my first time with this whole bugzilla thing so bare with my errors please



Index: trunk/src/cgame/cg_servercmds.c
===================================================================
--- trunk/src/cgame/cg_servercmds.c     (.../svn://svn.icculus.org/tremulous/trunk)     (revision 802)
+++ trunk/src/cgame/cg_servercmds.c     (.../trunk)     (working copy)
@@ -584,15 +584,27 @@
     case MN_H_ARMOURY:  trap_SendConsoleCommand( "menu tremulous_humanarmoury\n" ); break;

     case MN_A_TEAMFULL:
-      trap_Cvar_Set( "ui_dialog", "The alien team has too many players. Please wait until "
+      if( !cg_disableWarningDialogs.integer )
+      {
+       trap_Cvar_Set( "ui_dialog", "The alien team has too many players. Please wait until "
                                   "slots become available or join the human team." );
-      trap_SendConsoleCommand( "menu tremulous_alien_dialog\n" );
+       trap_SendConsoleCommand( "menu tremulous_alien_dialog\n" );
+      }
+      else
+        CG_Printf( "The alien team has too many players\n" );
+
       break;

     case MN_H_TEAMFULL:
-      trap_Cvar_Set( "ui_dialog", "The human team has too many players. Please wait until "
+      if( !cg_disableWarningDialogs.integer )
+      {
+       trap_Cvar_Set( "ui_dialog", "The human team has too many players. Please wait until "
                                   "slots become available or join the alien team." );
-      trap_SendConsoleCommand( "menu tremulous_human_dialog\n" );
+       trap_SendConsoleCommand( "menu tremulous_human_dialog\n" );
+      }
+      else
+        CG_Printf( "The human team has too many players\n" );
+
       break;

     case MN_H_NOROOM:
Comment 1 rasz 2006-07-19 14:25:26 EDT
Created attachment 968 [details]
.

diff
Comment 2 Martin Doucha 2006-07-24 04:44:08 EDT
Created attachment 978 [details]
Rewritten CG_Menu()

I've rewritten CG_Menu() to be more readable with less duplicit code. New short messages are also included.
Comment 3 Martin Doucha 2006-07-24 04:48:45 EDT
I've forgot to mention that the original MN_A_HOVEL_OCCUPIED long message didn't make much sense because there can be only one hovel in the game but the message suggested that the builder who wanted to hide inside occupied hovel should build more hovels.
Comment 4 Tim Angus 2006-12-29 13:22:37 EST
Used Martin's patch, with a few stylistic edits.