]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix a few checkpvs calls
authorterencehill <piuntn@gmail.com>
Wed, 16 Aug 2017 13:46:08 +0000 (15:46 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 16 Aug 2017 13:46:08 +0000 (15:46 +0200)
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/server/mutators/mutator/gamemode_assault.qc

index 223a81f7c4d4dfb6039a3ea6b2189b0df864dfd0..9992a37f4ce032faa7f25549728ff5d3303846a2 100644 (file)
@@ -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;
index 85801af52a8fc900db8fcff339c2b6b153c5226d..bd88131d31b2ddfa6e6e2a81aac0e55c63a7ec37 100644 (file)
@@ -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;