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

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Apr 17 15:16:43 EDT 2009


Author: div0
Date: 2009-04-17 15:16:41 -0400 (Fri, 17 Apr 2009)
New Revision: 6528

Modified:
   trunk/data/qcsrc/client/casings.qc
   trunk/data/qcsrc/client/gibs.qc
   trunk/data/qcsrc/client/main.qh
   trunk/data/qcsrc/client/wall.qc
Log:
avoid drawing clientwall/etc. with alpha <= 0.003


Modified: trunk/data/qcsrc/client/casings.qc
===================================================================
--- trunk/data/qcsrc/client/casings.qc	2009-04-17 19:12:51 UTC (rev 6527)
+++ trunk/data/qcsrc/client/casings.qc	2009-04-17 19:16:41 UTC (rev 6528)
@@ -12,7 +12,7 @@
 	self.renderflags = 0;
 	self.alpha = bound(0, self.cnt - time, 1);
 
-	if(self.alpha == 0)
+	if(self.alpha < ALPHA_MIN_VISIBLE)
 		remove(self);
 	else
 		R_AddEntity(self);

Modified: trunk/data/qcsrc/client/gibs.qc
===================================================================
--- trunk/data/qcsrc/client/gibs.qc	2009-04-17 19:12:51 UTC (rev 6527)
+++ trunk/data/qcsrc/client/gibs.qc	2009-04-17 19:16:41 UTC (rev 6528)
@@ -37,7 +37,7 @@
 	self.renderflags = 0;
 	self.alpha = bound(0, self.nextthink - time, 1);
 
-	if(self.alpha == 0)
+	if(self.alpha < ALPHA_MIN_VISIBLE)
 		remove(self);
 	else
 		R_AddEntity(self);

Modified: trunk/data/qcsrc/client/main.qh
===================================================================
--- trunk/data/qcsrc/client/main.qh	2009-04-17 19:12:51 UTC (rev 6527)
+++ trunk/data/qcsrc/client/main.qh	2009-04-17 19:16:41 UTC (rev 6528)
@@ -151,3 +151,5 @@
 vector camera_direction;
 
 void centerprint(string strMessage);
+
+#define ALPHA_MIN_VISIBLE 0.003

Modified: trunk/data/qcsrc/client/wall.qc
===================================================================
--- trunk/data/qcsrc/client/wall.qc	2009-04-17 19:12:51 UTC (rev 6527)
+++ trunk/data/qcsrc/client/wall.qc	2009-04-17 19:16:41 UTC (rev 6528)
@@ -18,11 +18,10 @@
 		self.origin = self.origin + self.movedir * f;
 	}
 	else
-	{
 		self.alpha = 1;
-	}
 
-	R_AddEntity(self);
+	if(self.alpha >= ALPHA_MIN_VISIBLE)
+		R_AddEntity(self);
 
 	self.origin = save;
 }



More information about the nexuiz-commits mailing list