r5900 - in trunk/data/qcsrc: client server

esteel at icculus.org esteel at icculus.org
Thu Feb 19 16:04:25 EST 2009


Author: esteel
Date: 2009-02-19 16:04:19 -0500 (Thu, 19 Feb 2009)
New Revision: 5900

Modified:
   trunk/data/qcsrc/client/sbar.qc
   trunk/data/qcsrc/server/cl_client.qc
   trunk/data/qcsrc/server/teamplay.qc
Log:
show the WelcomeMessage only on join for welcome_message_time seconds or when +show_info if pressed because many people did not know you can make this msg disappear with +zoom.\
add a line telling specs and observers about +show_info in the upper right

Modified: trunk/data/qcsrc/client/sbar.qc
===================================================================
--- trunk/data/qcsrc/client/sbar.qc	2009-02-19 19:43:00 UTC (rev 5899)
+++ trunk/data/qcsrc/client/sbar.qc	2009-02-19 21:04:19 UTC (rev 5900)
@@ -1764,6 +1764,9 @@
 			s = strcat("^1Press ^3", getcommandkey("secondary fire", "+attack2"), "^1 to observe");
 		o = Sbar_DrawNoteLine(o, s);
 
+		s = strcat("^1Press ^3", getcommandkey("server info", "+show_info"), "^1 for gamemode info");
+		o = Sbar_DrawNoteLine(o, s);
+
 		if(gametype == GAME_ARENA)
 			s = "^1Wait for your turn to join";
 		else if(gametype == GAME_LMS)

Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc	2009-02-19 19:43:00 UTC (rev 5899)
+++ trunk/data/qcsrc/server/cl_client.qc	2009-02-19 21:04:19 UTC (rev 5900)
@@ -74,7 +74,6 @@
 
 #define SPAWNPOINT_SCORE frags
 
-.float wantswelcomemessage;
 .string netname_previous;
 
 void spawnfunc_info_player_survivor (void)
@@ -564,7 +563,6 @@
 	self.punchvector = '0 0 0';
 	self.oldvelocity = self.velocity;
 	self.customizeentityforclient = Client_customizeentityforclient;
-	self.wantswelcomemessage = 1;
 
 	if(g_arena)
 	{
@@ -1869,7 +1867,6 @@
 		msg_entity = self;
 		WriteByte(MSG_ONE, SVC_SETVIEW);
 		WriteEntity(MSG_ONE, self.enemy);
-		self.wantswelcomemessage = 1;
 	 	//stuffcmd(self, "set viewsize $tmpviewsize \n");
 		if(!SpectateUpdate())
 			PutObserverInServer();
@@ -2029,10 +2026,7 @@
 			self.flags |= FL_JUMPRELEASED;
 		}
 	}
-	if(self.BUTTON_ZOOM)
-		self.wantswelcomemessage = 0;
-	if(self.wantswelcomemessage)
-		PrintWelcomeMessage(self);
+	PrintWelcomeMessage(self);
 }
 
 void SpectatorThink()
@@ -2066,10 +2060,7 @@
 			self.flags |= FL_JUMPRELEASED;
 		}
 	}
-	if(self.BUTTON_ZOOM)
-		self.wantswelcomemessage = 0;
-	if(self.wantswelcomemessage)
-		PrintWelcomeMessage(self);
+	PrintWelcomeMessage(self);
 	self.flags |= FL_CLIENT | FL_NOTARGET;
 }
 
@@ -2150,13 +2141,8 @@
 
 		CheckRules_Player();
 
-		if(self.BUTTON_INFO)
-			PrintWelcomeMessage(self);
+		PrintWelcomeMessage(self);
 
-		if(g_lms || !cvar("sv_spectate"))
-		if((time - self.jointime) <= cvar("welcome_message_time"))
-			PrintWelcomeMessage(self);
-
 		if (intermission_running)
 		{
 			IntermissionThink ();	// otherwise a button could be missed between
@@ -2431,7 +2417,6 @@
 		if (intermission_running)
 			return;		// intermission or finale
 
-		//PrintWelcomeMessage(self);
 		//if (TetrisPostFrame()) return;
 
 		// restart countdown

Modified: trunk/data/qcsrc/server/teamplay.qc
===================================================================
--- trunk/data/qcsrc/server/teamplay.qc	2009-02-19 19:43:00 UTC (rev 5899)
+++ trunk/data/qcsrc/server/teamplay.qc	2009-02-19 21:04:19 UTC (rev 5900)
@@ -367,11 +367,11 @@
 {
 	string s, mutator, modifications, motd;
 
-	/*if(self.welcomemessage_time > time)
+	if(self.cvar_scr_centertime == 0) return;
+	if((time - self.jointime) > cvar("welcome_message_time")
+	   && !self.BUTTON_INFO)
 		return;
-	self.welcomemessage_time = time + 0.8; */
 
-	if(self.cvar_scr_centertime == 0) return;
 	if( !(timeoutStatus >= 1 || (time < game_starttime) ) ) { //really print the WelcomeMessage to the player every frame when timeout-seconds are shown or the game is restarted, to make sure that the shown number is accurate
 		if(self.welcomemessage_time > time) return;
 		self.welcomemessage_time = time + self.cvar_scr_centertime * 0.6;
@@ -485,7 +485,6 @@
 	s = strcat(s, "\n");
 
 	centerprint(pl, s);
-	//sprint(pl, s);
 }
 
 




More information about the nexuiz-commits mailing list