r1894 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Sep 21 16:02:59 EDT 2006


Author: div0
Date: 2006-09-21 16:02:59 -0400 (Thu, 21 Sep 2006)
New Revision: 1894

Modified:
   trunk/data/qcsrc/server/cl_client.qc
Log:
yaoops


Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc	2006-09-21 19:59:00 UTC (rev 1893)
+++ trunk/data/qcsrc/server/cl_client.qc	2006-09-21 20:02:59 UTC (rev 1894)
@@ -1145,12 +1145,12 @@
 
 float CalcRegen(float current, float stable, float maxv, float regenfactor)
 {
-	if(current > maxv)
+	if(current > stable)
 		return current;
-	else if(current > maxv - 0.25) // when close enough, "snap"
-		return maxv;
+	else if(current > stable - 0.25) // when close enough, "snap"
+		return stable;
 	else
-		return bound(0, current + (maxv - current) * regenfactor * frametime, maxv);
+		return bound(0, current + (stable - current) * regenfactor * frametime, maxv);
 }
 
 void player_regen (void)




More information about the nexuiz-commits mailing list