[nexuiz-commits] r7564 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Aug 31 01:17:04 EDT 2009


Author: div0
Date: 2009-08-31 01:17:04 -0400 (Mon, 31 Aug 2009)
New Revision: 7564

Modified:
   trunk/data/qcsrc/server/t_jumppads.qc
Log:
[NOT FOR 2.5.2] projectiles on jumppads: make them fall by gravity after hitting a jumppad, so they fly the proper path of the pad


Modified: trunk/data/qcsrc/server/t_jumppads.qc
===================================================================
--- trunk/data/qcsrc/server/t_jumppads.qc	2009-08-30 20:45:16 UTC (rev 7563)
+++ trunk/data/qcsrc/server/t_jumppads.qc	2009-08-31 05:17:04 UTC (rev 7564)
@@ -153,8 +153,6 @@
 
 	other.velocity = self.movedir;
 
-	UpdateCSQCProjectile(other);
-
 	if (other.classname == "player")
 	{
 		// reset tracking of oldvelocity for impact damage (sudden velocity changes)
@@ -206,7 +204,21 @@
 	}
 
 	if (other.flags & FL_PROJECTILE)
+	{
 		other.angles = vectoangles (other.velocity);
+		switch(other.movetype)
+		{
+			case MOVETYPE_FLY:
+				other.movetype = MOVETYPE_TOSS;
+				other.gravity = 1;
+				break;
+			case MOVETYPE_BOUNCEMISSILE:
+				other.movetype = MOVETYPE_BOUNCE;
+				other.gravity = 1;
+				break;
+		}
+		UpdateCSQCProjectile(other);
+	}
 
 	if (self.spawnflags & PUSH_ONCE)
 	{



More information about the nexuiz-commits mailing list