[nexuiz-commits] r6420 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Apr 3 09:51:35 EDT 2009
Author: mand1nga
Date: 2009-04-03 09:51:31 -0400 (Fri, 03 Apr 2009)
New Revision: 6420
Modified:
trunk/data/qcsrc/server/havocbot.qc
Log:
Improved jetpack usage and rocket jumping
Modified: trunk/data/qcsrc/server/havocbot.qc
===================================================================
--- trunk/data/qcsrc/server/havocbot.qc 2009-04-03 04:32:29 UTC (rev 6419)
+++ trunk/data/qcsrc/server/havocbot.qc 2009-04-03 13:51:31 UTC (rev 6420)
@@ -356,6 +356,7 @@
}
// If there is a trigger_hurt right below try to use the jetpack or make a rocketjump
+ if(skill>6)
if not(self.flags & FL_ONGROUND)
{
tracebox(self.origin, self.mins, self.maxs, self.origin + '0 0 -65536', MOVE_NOMONSTERS, self);
@@ -374,18 +375,49 @@
}
else
self.BUTTON_HOOK = TRUE;
+
+ // If there is no goal try to move forward
+ if(self.goalcurrent==world)
+ {
+ local float speed = fabs(self.velocity_x) + fabs(self.velocity_y);
+
+ if(speed > (maxspeed / 1.5) && speed > (maxspeed / 4))
+ {
+ self.movement_x = 0;
+ }
+ else
+ {
+ makevectors(self.v_angle_y * '0 1 0');
+ tracebox(self.origin, self.mins, self.maxs, self.origin + (v_forward * maxspeed * 3), MOVE_NOMONSTERS, self);
+
+ if(trace_fraction==1)
+ {
+ if(speed < (maxspeed / 2))
+ self.movement_x = maxspeed;
+ }
+ }
+ }
}
else if(self.health>cvar("g_balance_rocketlauncher_damage")*0.5)
{
- if(self.velocity_z < -maxspeed)
+ if(self.velocity_z < 0)
if(client_hasweapon(self, WEP_ROCKET_LAUNCHER, TRUE, FALSE))
{
self.switchweapon = WEP_ROCKET_LAUNCHER;
self.v_angle_x = 90;
+ self.movement_x = maxspeed;
self.BUTTON_ATCK = TRUE;
self.BUTTON_ATCK2 = TRUE;
+ return;
}
}
+ else
+ {
+ // If there is no goal try to move forward
+ if(self.velocity_z<0)
+ if(self.goalcurrent==world)
+ self.movement_x = maxspeed;
+ }
}
// If we are under water with no goals, swim up
More information about the nexuiz-commits
mailing list