]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/havocbot/havocbot.qc
Make bot head to the jumppad destination once it reaches the goal item
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / havocbot / havocbot.qc
index b0772900cf5d88dcda18fdaaa4b7ea11a761d70f..d77c5a18eafd69d9489b464bbfe1111ff11ccc02 100644 (file)
@@ -577,6 +577,16 @@ void havocbot_movetogoal(entity this)
                        }
                        else
                        {
+                               if (this.goalcurrent.bot_pickup)
+                               {
+                                       entity jumppad_wp = this.goalcurrent_prev;
+                                       navigation_poptouchedgoals(this);
+                                       if(!this.goalcurrent && jumppad_wp.wp00)
+                                       {
+                                               // head to the jumppad destination once bot reaches the goal item
+                                               navigation_pushroute(this, jumppad_wp.wp00);
+                                       }
+                               }
                                gco = (this.goalcurrent.absmin + this.goalcurrent.absmax) * 0.5;
                                if (this.origin.z > gco.z && vdist(vec2(this.velocity), <, autocvar_sv_maxspeed))
                                        this.aistatus &= ~AI_STATUS_OUT_JUMPPAD;
@@ -614,8 +624,8 @@ void havocbot_movetogoal(entity this)
        if (skill > 6 && !(IS_ONGROUND(this)))
        {
                #define ROCKETJUMP_DAMAGE() WEP_CVAR(devastator, damage) * 0.8 \
-                       * ((this.strength_finished < time) ? autocvar_g_balance_powerup_strength_selfdamage : 1) \
-                       * ((this.invincible_finished < time) ? autocvar_g_balance_powerup_invincible_takedamage : 1)
+                       * ((this.strength_finished > time) ? autocvar_g_balance_powerup_strength_selfdamage : 1) \
+                       * ((this.invincible_finished > time) ? autocvar_g_balance_powerup_invincible_takedamage : 1)
 
                tracebox(this.origin, this.mins, this.maxs, this.origin + '0 0 -65536', MOVE_NOMONSTERS, this);
                if(tracebox_hits_trigger_hurt(this.origin, this.mins, this.maxs, trace_endpos ))