// leave a valid one even if it won't reach
findtrajectory_velocity = normalize(end - org) * shotspeed + shotspeedupward * '0 0 1';
return FALSE;
-};
+}
void lag_update()
{
if (self.lag3_time) if (time > self.lag3_time) {self.lag_func(self.lag3_time, self.lag3_float1, self.lag3_float2, self.lag3_entity1, self.lag3_vec1, self.lag3_vec2, self.lag3_vec3, self.lag3_vec4);self.lag3_time = 0;}
if (self.lag4_time) if (time > self.lag4_time) {self.lag_func(self.lag4_time, self.lag4_float1, self.lag4_float2, self.lag4_entity1, self.lag4_vec1, self.lag4_vec2, self.lag4_vec3, self.lag4_vec4);self.lag4_time = 0;}
if (self.lag5_time) if (time > self.lag5_time) {self.lag_func(self.lag5_time, self.lag5_float1, self.lag5_float2, self.lag5_entity1, self.lag5_vec1, self.lag5_vec2, self.lag5_vec3, self.lag5_vec4);self.lag5_time = 0;}
-};
+}
float lag_additem(float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4)
{
if (self.lag5_time == 0) {self.lag5_time = t;self.lag5_float1 = f1;self.lag5_float2 = f2;self.lag5_entity1 = e1;self.lag5_vec1 = v1;self.lag5_vec2 = v2;self.lag5_vec3 = v3;self.lag5_vec4 = v4;return TRUE;}
// no room for it (what is the best thing to do here??)
return FALSE;
-};
+}
float bot_shouldattack(entity e)
{
if(e.flags & FL_NOTARGET)
return FALSE;
return TRUE;
-};
+}
void bot_lagfunc(float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4)
{
self.bot_canfire = (random() < 0.95);
else
self.bot_canfire = 1;
-};
+}
float bot_aimdir(vector v, float maxfiredeviation)
{
//dprint(" diff:", vtos(diffang), "\n");
return self.bot_canfire && (time < self.bot_firetimer);
-};
+}
vector bot_shotlead(vector targorigin, vector targvelocity, float shotspeed, float shotdelay)
{
// Try to add code here that predicts gravity effect here, no clue HOW to though ... well not yet atleast...
return targorigin + targvelocity * (shotdelay + vlen(targorigin - shotorg) / shotspeed);
-};
+}
float bot_aim(float shotspeed, float shotspeedupward, float maxshottime, float applygravity)
{
// return FALSE;
self.dphitcontentsmask = hf;
return TRUE;
-};
+}