X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fkeepaway%2Fkeepaway.qc;h=7c0356b38d739d790cf150a4c93c71ae959bedeb;hb=70bba988cd32922d29e40235db6ad1d8149bdc67;hp=8eb88a3bb79c4ba70190e8a2fedb3c284638b8a1;hpb=ec98f5c9d50f267779fed871c9eb094a52064219;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qc b/qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qc index 8eb88a3bb..7c0356b38 100644 --- a/qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qc +++ b/qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qc @@ -64,7 +64,7 @@ void ka_RespawnBall(entity this) // runs whenever the ball needs to be relocated settouch(this, ka_TouchEvent); setthink(this, ka_RespawnBall); this.nextthink = time + autocvar_g_keepawayball_respawntime; - navigation_dynamicgoal_set(this); + navigation_dynamicgoal_set(this, NULL); Send_Effect(EFFECT_ELECTRO_COMBO, oldballorigin, '0 0 0', 1); Send_Effect(EFFECT_ELECTRO_COMBO, this.origin, '0 0 0', 1); @@ -164,10 +164,11 @@ void ka_DropEvent(entity plyr) // runs any time that a player is supposed to los ball.effects &= ~EF_NODRAW; setorigin(ball, plyr.origin + '0 0 10'); ball.velocity = '0 0 200' + '0 100 0'*crandom() + '100 0 0'*crandom(); - entity e = ball.owner; ball.owner = NULL; + entity e = ball.owner; + ball.owner = NULL; e.ballcarried = NULL; GameRules_scoring_vip(e, false); - navigation_dynamicgoal_set(ball); + navigation_dynamicgoal_set(ball, e); // reset the player effects plyr.glow_trail = false; @@ -212,20 +213,15 @@ void ka_Reset(entity this) void havocbot_goalrating_ball(entity this, float ratingscale, vector org) { - float t; entity ball_owner; ball_owner = ka_ball.owner; if (ball_owner == this) return; - // If ball is carried by player then hunt them down. if (ball_owner) - { - t = (this.health + this.armorvalue) / (ball_owner.health + ball_owner.armorvalue); - navigation_routerating(this, ball_owner, t * ratingscale, 2000); - } - else // Ball has been dropped so collect. + navigation_routerating(this, ball_owner, ratingscale, 2000); + else navigation_routerating(this, ka_ball, ratingscale, 2000); } @@ -238,7 +234,7 @@ void havocbot_role_ka_carrier(entity this) { navigation_goalrating_start(this); havocbot_goalrating_items(this, 10000, this.origin, 10000); - havocbot_goalrating_enemyplayers(this, 20000, this.origin, 10000); + havocbot_goalrating_enemyplayers(this, 10000, this.origin, 10000); havocbot_goalrating_waypoints(this, 1, this.origin, 3000); navigation_goalrating_end(this); @@ -261,8 +257,8 @@ void havocbot_role_ka_collector(entity this) { navigation_goalrating_start(this); havocbot_goalrating_items(this, 10000, this.origin, 10000); - havocbot_goalrating_enemyplayers(this, 1000, this.origin, 10000); - havocbot_goalrating_ball(this, 20000, this.origin); + havocbot_goalrating_enemyplayers(this, 500, this.origin, 10000); + havocbot_goalrating_ball(this, 8000, this.origin); navigation_goalrating_end(this); navigation_goalrating_timeout_set(this);