[nexuiz-commits] r6671 - trunk/data/qcsrc/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue May 5 09:42:15 EDT 2009


Author: mand1nga
Date: 2009-05-05 09:42:14 -0400 (Tue, 05 May 2009)
New Revision: 6671

Modified:
   trunk/data/qcsrc/client/View.qc
Log:
Attempt to make the porto beam to not be displayed on spectator mode

Modified: trunk/data/qcsrc/client/View.qc
===================================================================
--- trunk/data/qcsrc/client/View.qc	2009-05-05 12:54:23 UTC (rev 6670)
+++ trunk/data/qcsrc/client/View.qc	2009-05-05 13:42:14 UTC (rev 6671)
@@ -11,7 +11,7 @@
 	vector p, dir, ang, q, nextdir;
 	float idx, portal_number, portal1_idx;
 
-	if(activeweapon != WEP_PORTO)
+	if(activeweapon != WEP_PORTO || spectatee_status)
 		return;
 
 	dir = view_forward;
@@ -108,7 +108,7 @@
 float drawtime;
 
 float tan(float x)
-{ 
+{
 	return sin(x) / cos(x);
 }
 float atan2(float y, float x)
@@ -213,7 +213,7 @@
 		case WEP_PORTO: // shoots from eye
 		case WEP_HOOK: // no trueaim
 		case WEP_GRENADE_LAUNCHER: // toss curve
-			return 1; 
+			return 1;
 		case WEP_CAMPINGRIFLE:
 			if(zoomscript_caught)
 				return 1; // shoots from eye when zoomed
@@ -236,7 +236,7 @@
 		vecs_y = -vecs_y;
 	else
 		vecs = '0 0 0';
-	
+
 	w_shotorg = view_origin + view_right * vecs_y + view_up * vecs_z;
 
 	// now move the vecs forward as much as requested if possible
@@ -314,7 +314,7 @@
 	// might even be better to add the gametype to TE_CSQC_INIT...?
 	if(!postinit)
 		PostInit();
-	
+
 	CheckForGamestartChange();
 	maptimeAnnouncer();
 
@@ -337,7 +337,7 @@
 			ignore_minus_zoom += 1;
 		}
 	}
-	
+
 	sbar_alpha_fg = cvar("sbar_alpha_fg" );
 	sbar_hudselector = cvar("sbar_hudselector");
 	ColorTranslateMode = cvar("cl_stripcolorcodes");
@@ -388,17 +388,17 @@
 	{
 		// Enable required Darkplaces cvars
 		chase_active_backup = cvar("chase_active");
-		cvar_set("chase_active", "2");		
+		cvar_set("chase_active", "2");
 		cvar_set("cl_demo_mousegrab", "1");
 		camera_active = TRUE;
 		camera_mode = FALSE;
 	}
-	
+
 	// Draw the Crosshair
 	float scoreboard_active;
 	scoreboard_active = Sbar_WouldDrawScoreboard();
 	R_SetView(VF_DRAWCROSSHAIR, 0); //Make sure engine crosshairs are always hidden
-	
+
 	// Draw the Engine Status Bar (the default Quake HUD)
 	R_SetView(VF_DRAWENGINESBAR, 0);
 
@@ -437,7 +437,7 @@
 	// as long as the ctf part isn't in, this is useless
 	if(menu_visible)
 		menu_show();
-	
+
 	/*if(gametype == GAME_CTF)
 	{
 		ctf_view();
@@ -449,7 +449,7 @@
 		if(self.draw2d)
 			self.draw2d();
 	self = e;
-	
+
 	// draw radar
 	if(
 		ons_showmap
@@ -521,7 +521,7 @@
 			}
 
 			wcross_name = strcat("gfx/crosshair", wcross_style);
-		
+
 			wcross_size = drawgetimagesize(wcross_name);
 			wcross_size_x *= wcross_sizefloat;
 			wcross_size_y *= wcross_sizefloat;



More information about the nexuiz-commits mailing list