]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove unused return value from bot_aimdir
authorterencehill <piuntn@gmail.com>
Mon, 11 Dec 2017 14:50:22 +0000 (15:50 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 11 Dec 2017 14:50:22 +0000 (15:50 +0100)
qcsrc/server/bot/default/aim.qc
qcsrc/server/bot/default/aim.qh

index 94bbd752b4a936d94f387a5958b06d8d89c3abde..7441ce7bcab56cfafd3cf9e1ac8b6b68eab9385d 100644 (file)
@@ -174,7 +174,7 @@ void bot_lagfunc(entity this, float t, float f1, float f2, entity e1, vector v1,
                this.bot_canfire = 1;
 }
 
-float bot_aimdir(entity this, vector v, float maxfiredeviation)
+void bot_aimdir(entity this, vector v, float maxfiredeviation)
 {
        float dist, delta_t, blend;
        vector desiredang, diffang;
@@ -185,7 +185,7 @@ float bot_aimdir(entity this, vector v, float maxfiredeviation)
        this.v_angle_z = 0;
 
        // invalid aim dir (can happen when bot overlaps target)
-       if(!v) return false;
+       if(!v) return;
 
        // get the desired angles to aim at
        //dprint(" at:", vtos(v));
@@ -317,7 +317,7 @@ float bot_aimdir(entity this, vector v, float maxfiredeviation)
        //dprint(ftos(maxfiredeviation),"\n");
        //dprint(" diff:", vtos(diffang), "\n");
 
-       return this.bot_canfire && (time < this.bot_firetimer);
+       //return this.bot_canfire && (time < this.bot_firetimer);
 }
 
 vector bot_shotlead(vector targorigin, vector targvelocity, float shotspeed, float shotdelay)
@@ -328,7 +328,7 @@ vector bot_shotlead(vector targorigin, vector targvelocity, float shotspeed, flo
 
 bool bot_aim(entity this, .entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, bool applygravity)
 {
-       float f, r, hf, distanceratio;
+       float r, hf, distanceratio;
        vector v;
        /*
        eprint(this);
@@ -370,11 +370,11 @@ bool bot_aim(entity this, .entity weaponentity, float shotspeed, float shotspeed
                        return false;
                }
 
-               f = bot_aimdir(this, findtrajectory_velocity - shotspeedupward * '0 0 1', r);
+               bot_aimdir(this, findtrajectory_velocity - shotspeedupward * '0 0 1', r);
        }
        else
        {
-               f = bot_aimdir(this, v - shotorg, r);
+               bot_aimdir(this, v - shotorg, r);
                //dprint("AIM: ");dprint(vtos(this.bot_aimtargorigin));dprint(" + ");dprint(vtos(this.bot_aimtargvelocity));dprint(" * ");dprint(ftos(this.bot_aimlatency + vlen(this.bot_aimtargorigin - shotorg) / shotspeed));dprint(" = ");dprint(vtos(v));dprint(" : aimdir = ");dprint(vtos(normalize(v - shotorg)));dprint(" : ");dprint(vtos(shotdir));dprint("\n");
                //traceline(shotorg, shotorg + shotdir * 10000, false, this);
                //if (trace_ent.takedamage)
index e7c60758aec2eca3c46fe3c588a8cce4e635551e..b8b35f1c203a08968e3b82e7029bbfd17109e6dd 100644 (file)
@@ -90,7 +90,7 @@ void lag_update(entity this);
 void bot_lagfunc(entity this, float t, float f1, float f2, entity e1, vector v1, vector v2, vector v3, vector v4);
 
 float bot_shouldattack(entity this, entity targ);
-float bot_aimdir(entity this, vector v, float maxfiredeviation);
+void bot_aimdir(entity this, vector v, float maxfiredeviation);
 bool bot_aim(entity this, .entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, bool applygravity);
 float findtrajectorywithleading(vector org, vector m1, vector m2, entity targ, float shotspeed, float shotspeedupward, float maxtime, float shotdelay, entity ignore);