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

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Apr 3 11:19:18 EDT 2009


Author: mand1nga
Date: 2009-04-03 11:19:18 -0400 (Fri, 03 Apr 2009)
New Revision: 6421

Modified:
   trunk/data/qcsrc/server/havocbot.qc
Log:
Slightly improved rocket jumping

Modified: trunk/data/qcsrc/server/havocbot.qc
===================================================================
--- trunk/data/qcsrc/server/havocbot.qc	2009-04-03 13:51:31 UTC (rev 6420)
+++ trunk/data/qcsrc/server/havocbot.qc	2009-04-03 15:19:18 UTC (rev 6421)
@@ -274,6 +274,7 @@
 //.float bot_dodgevector_jumpbutton;
 .float ladder_time;
 .entity ladder_entity;
+.float rocketjumptime;
 void havocbot_movetogoal()
 {
 	local vector destorg;
@@ -403,18 +404,28 @@
 			if(self.velocity_z < 0)
 			if(client_hasweapon(self, WEP_ROCKET_LAUNCHER, TRUE, FALSE))
 			{
+				self.movement_x = maxspeed;
+
+				if(self.rocketjumptime)
+				{
+					if(time > self.rocketjumptime)
+					{
+						self.BUTTON_ATCK2 = TRUE;
+						self.rocketjumptime = 0;
+					}
+					return;
+				}
+
 				self.switchweapon = WEP_ROCKET_LAUNCHER;
 				self.v_angle_x = 90;
-				self.movement_x = maxspeed;
 				self.BUTTON_ATCK = TRUE;
-				self.BUTTON_ATCK2 = TRUE;
+				self.rocketjumptime = time + cvar("g_balance_rocketlauncher_detonatedelay");
 				return;
 			}
 		}
 		else
 		{
 			// If there is no goal try to move forward
-			if(self.velocity_z<0)
 			if(self.goalcurrent==world)
 				self.movement_x = maxspeed;
 		}



More information about the nexuiz-commits mailing list