[nexuiz-commits] r8376 - in trunk/data: . qcsrc/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Dec 6 07:51:37 EST 2009


Author: div0
Date: 2009-12-06 07:51:36 -0500 (Sun, 06 Dec 2009)
New Revision: 8376

Modified:
   trunk/data/defaultNexuiz.cfg
   trunk/data/qcsrc/client/casings.qc
   trunk/data/qcsrc/client/gibs.qc
   trunk/data/qcsrc/client/movetypes.qc
   trunk/data/qcsrc/client/movetypes.qh
   trunk/data/qcsrc/client/progs.src
   trunk/data/qcsrc/client/projectile.qc
   trunk/data/qcsrc/client/sbar.qc
Log:
sloppy (faster) gibs


Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg	2009-12-05 19:44:10 UTC (rev 8375)
+++ trunk/data/defaultNexuiz.cfg	2009-12-06 12:51:36 UTC (rev 8376)
@@ -826,9 +826,14 @@
 seta cl_gibs_velocity_scale 1 "gib throw velocity force scale"
 seta cl_gibs_velocity_random 1 "gib throw velocity randomness scale"
 seta cl_gibs_velocity_up 0 "extra z velocity for gibs"
+seta cl_gibs_ticrate 0.1 "ticrate for gibs"
+seta cl_gibs_sloppy 1 "sloppy gibs, may temporarily penetrate walls"
 seta cl_casings 1 "enable or disable bullet casings"
 seta cl_casings_shell_time 30 "shell casing lifetime"
 seta cl_casings_bronze_time 10 "bullet casings lifetime"
+seta cl_casings_ticrate 0.1 "ticrate for casings"
+seta cl_casings_sloppy 1 "sloppy casings, may temporarily penetrate walls"
+seta cl_projectiles_sloppy 0 "sloppy projectiles, may temporarily penetrate walls"
 cl_stainmaps 0
 cl_particles_smoke 1
 r_glsl 1

Modified: trunk/data/qcsrc/client/casings.qc
===================================================================
--- trunk/data/qcsrc/client/casings.qc	2009-12-05 19:44:10 UTC (rev 8375)
+++ trunk/data/qcsrc/client/casings.qc	2009-12-06 12:51:36 UTC (rev 8376)
@@ -14,7 +14,7 @@
 		self.flags &~= FL_ONGROUND;
 	}
 
-	Movetype_Physics_NoMatchServer();
+	Movetype_Physics_MatchTicrate(autocvar_cl_casings_ticrate, autocvar_cl_casings_sloppy);
 
 	self.renderflags = 0;
 	self.alpha = bound(0, self.cnt - time, 1);

Modified: trunk/data/qcsrc/client/gibs.qc
===================================================================
--- trunk/data/qcsrc/client/gibs.qc	2009-12-05 19:44:10 UTC (rev 8375)
+++ trunk/data/qcsrc/client/gibs.qc	2009-12-06 12:51:36 UTC (rev 8376)
@@ -84,7 +84,7 @@
 	vector oldorg;
 	oldorg = self.origin;
 
-	Movetype_Physics_NoMatchServer();
+	Movetype_Physics_MatchTicrate(autocvar_cl_gibs_ticrate, autocvar_cl_gibs_sloppy);
 	if(wasfreed(self))
 		return;
 

Modified: trunk/data/qcsrc/client/movetypes.qc
===================================================================
--- trunk/data/qcsrc/client/movetypes.qc	2009-12-05 19:44:10 UTC (rev 8375)
+++ trunk/data/qcsrc/client/movetypes.qc	2009-12-06 12:51:36 UTC (rev 8376)
@@ -377,11 +377,16 @@
 	setorigin(self, self.move_origin);
 }
 
-void Movetype_Physics_MatchServer() // SV_Physics_Entity
+void Movetype_Physics_MatchServer(float sloppy)
 {
+	Movetype_Physics_MatchTicrate(ticrate, sloppy);
+}
+
+void Movetype_Physics_MatchTicrate(float tr, float sloppy) // SV_Physics_Entity
+{
 	float n, i, dt, movedt;
 
-	if(ticrate <= 0)
+	if(tr <= 0)
 	{
 		Movetype_Physics_NoMatchServer();
 		return;
@@ -389,10 +394,10 @@
 
 	dt = time - self.move_time;
 
-	movedt = ticrate;
-	n = max(0, floor(dt / ticrate));
-	dt -= n * ticrate;
-	self.move_time += n * ticrate;
+	movedt = tr;
+	n = max(0, floor(dt / tr));
+	dt -= n * tr;
+	self.move_time += n * tr;
 
 	//self.move_didgravity = ((self.move_movetype == MOVETYPE_BOUNCE || self.move_movetype == MOVETYPE_TOSS) && !(self.move_flags & FL_ONGROUND));
 	// we use the field as set by the last run of this
@@ -420,14 +425,16 @@
 
 		self.angles = self.move_angles + dt * self.avelocity;
 
-		if(self.movetype != MOVETYPE_NOCLIP)
+		if(sloppy || self.movetype == MOVETYPE_NOCLIP)
 		{
+			setorigin(self, self.move_origin + dt * self.velocity);
+		}
+		else
+		{
 			_Movetype_PushEntityTrace(dt * self.velocity);
 			if(!trace_startsolid)
 				setorigin(self, trace_endpos);
 		}
-		else
-			setorigin(self, self.move_origin + dt * self.velocity);
 	}
 	else
 	{

Modified: trunk/data/qcsrc/client/movetypes.qh
===================================================================
--- trunk/data/qcsrc/client/movetypes.qh	2009-12-05 19:44:10 UTC (rev 8375)
+++ trunk/data/qcsrc/client/movetypes.qh	2009-12-06 12:51:36 UTC (rev 8376)
@@ -10,7 +10,8 @@
 .float move_bounce_stopspeed;
 .float move_nomonsters; // -1 for MOVE_NORMAL, otherwise a MOVE_ constant
 
-void Movetype_Physics_MatchServer();
+void Movetype_Physics_MatchTicrate(float tr, float sloppy);
+void Movetype_Physics_MatchServer(float sloppy);
 void Movetype_Physics_NoMatchServer();
 
 float	MOVETYPE_NONE				= 0;

Modified: trunk/data/qcsrc/client/progs.src
===================================================================
--- trunk/data/qcsrc/client/progs.src	2009-12-05 19:44:10 UTC (rev 8375)
+++ trunk/data/qcsrc/client/progs.src	2009-12-06 12:51:36 UTC (rev 8376)
@@ -11,6 +11,9 @@
 ../common/items.qh
 
 ../common/mapinfo.qh
+
+autocvars.qh
+
 interpolate.qh
 teamradar.qh
 waypointsprites.qh

Modified: trunk/data/qcsrc/client/projectile.qc
===================================================================
--- trunk/data/qcsrc/client/projectile.qc	2009-12-05 19:44:10 UTC (rev 8375)
+++ trunk/data/qcsrc/client/projectile.qc	2009-12-06 12:51:36 UTC (rev 8376)
@@ -45,7 +45,7 @@
 	if(self.count & 0x80)
 	{
 		//self.move_flags &~= FL_ONGROUND;
-		Movetype_Physics_MatchServer();
+		Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);
 		if(!(self.move_flags & FL_ONGROUND))
 			self.angles = vectoangles(self.velocity);
 	}
@@ -149,7 +149,6 @@
 void Ent_Projectile()
 {
 	float f;
-	string trailname;
 
 	// projectile properties:
 	//   kind (interpolated, or clientside)

Modified: trunk/data/qcsrc/client/sbar.qc
===================================================================
--- trunk/data/qcsrc/client/sbar.qc	2009-12-05 19:44:10 UTC (rev 8375)
+++ trunk/data/qcsrc/client/sbar.qc	2009-12-06 12:51:36 UTC (rev 8376)
@@ -53,22 +53,22 @@
 
 vector Sbar_AccuracyColor(float accuracy)
 {
-	vector color;
+	vector rgb;
 	float yellow_accuracy = cvar("sbar_accuracy_yellow"); // value at which this function returns yellow
 	if(accuracy >= 100) {
-		color_x = 0;
-		color_y = 1;
+		rgb_x = 0;
+		rgb_y = 1;
 	}
 	else if(accuracy > yellow_accuracy) {
-		color_x = 1 - (accuracy-yellow_accuracy)/(100-yellow_accuracy); // red value between 1 -> 0
-		color_y = 1;
+		rgb_x = 1 - (accuracy-yellow_accuracy)/(100-yellow_accuracy); // red value between 1 -> 0
+		rgb_y = 1;
 	}
 	else {
-		color_x = 1;
-		color_y = accuracy/yellow_accuracy; // green value between 0 -> 1
+		rgb_x = 1;
+		rgb_y = accuracy/yellow_accuracy; // green value between 0 -> 1
 	}
-	color_z = 0;
-	return color;
+	rgb_z = 0;
+	return rgb;
 }
 
 float weaponspace[10];
@@ -1213,9 +1213,8 @@
 			float padding;
 			padding = ((sbwidth/weapon_cnt) - stringwidth(s, FALSE) * fontsize) / 2; // center the accuracy value
 
-			vector color;
-			color = Sbar_AccuracyColor(weapon_stats);
-			drawstring(pos + '1 0 0' * padding + '0 1 0' * height * (2/3), s, '1 1 0' * fontsize, color, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+			rgb = Sbar_AccuracyColor(weapon_stats);
+			drawstring(pos + '1 0 0' * padding + '0 1 0' * height * (2/3), s, '1 1 0' * fontsize, rgb, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);
 		}
 		pos_x += sbwidth/weapon_cnt * rows;
 		if(rows == 2 && i == 6) {
@@ -1641,7 +1640,6 @@
 		vector m;
 		string s, forcetime;
 
-		float pos;
 		m = '0.5 0 0' * vid_conwidth + '0 1 0' * cvar_or("cl_racetimer_position", 0.25) * vid_conheight;
 
 		if(race_checkpointtime)



More information about the nexuiz-commits mailing list