From 2bef06fcd0faafa3d550dd49559e301b2722303e Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 16 Aug 2017 15:46:08 +0200 Subject: [PATCH] Fix a few checkpvs calls --- qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc | 8 ++++---- qcsrc/server/mutators/mutator/gamemode_assault.qc | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc index 223a81f7c..9992a37f4 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc @@ -1377,8 +1377,8 @@ void havocbot_goalrating_ons_controlpoints_attack(entity this, float ratingscale best.cnt += 1; this.havocbot_attack_time = 0; - if(checkpvs(this.view_ofs,cp)) - if(checkpvs(this.view_ofs,best)) + if(checkpvs(this.origin + this.view_ofs, cp)) + if(checkpvs(this.origin + this.view_ofs, best)) this.havocbot_attack_time = time + 2; } else @@ -1448,8 +1448,8 @@ bool havocbot_goalrating_ons_generator_attack(entity this, float ratingscale) bestwp.cnt += 1; this.havocbot_attack_time = 0; - if(checkpvs(this.view_ofs,g)) - if(checkpvs(this.view_ofs,bestwp)) + if(checkpvs(this.origin + this.view_ofs, g)) + if(checkpvs(this.origin + this.view_ofs, bestwp)) this.havocbot_attack_time = time + 5; return true; diff --git a/qcsrc/server/mutators/mutator/gamemode_assault.qc b/qcsrc/server/mutators/mutator/gamemode_assault.qc index 85801af52..bd88131d3 100644 --- a/qcsrc/server/mutators/mutator/gamemode_assault.qc +++ b/qcsrc/server/mutators/mutator/gamemode_assault.qc @@ -429,8 +429,8 @@ void havocbot_goalrating_ast_targets(entity this, float ratingscale) this.havocbot_attack_time = 0; - if(checkpvs(this.view_ofs,it)) - if(checkpvs(this.view_ofs,best)) + if(checkpvs(this.origin + this.view_ofs, it)) + if(checkpvs(this.origin + this.view_ofs, best)) { // dprint("increasing attack time for this target\n"); this.havocbot_attack_time = time + 2; -- 2.39.2