]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix regression introduced in f5f2dd9b where the arc beam stops for a moment while...
authorterencehill <piuntn@gmail.com>
Sun, 23 Jun 2024 22:56:51 +0000 (00:56 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 23 Jun 2024 22:56:51 +0000 (00:56 +0200)
qcsrc/common/weapons/weapon/arc.qc

index 2869843a416dd97f598d1b9c19c92943cf28a7ad..02090a411513cd75efe825ffa0cbabe721a769ab 100644 (file)
@@ -959,7 +959,9 @@ void Draw_ArcBeam(entity this)
                if(v_shot_idx && this.beam_usevieworigin == 2)
                {
                        start_pos = gettaginfo(wepent, v_shot_idx) - '0 0 2';
-                       traceline(start_pos_saved, start_pos, MOVE_NORMAL, this);
+                       // ignore our own player model in this traceline otherwise it may be hit with trace_fraction < 1
+                       // while crouching / standing up due to view height smoothing (cl_smoothviewheight)
+                       traceline(start_pos_saved, start_pos, MOVE_NORMAL, csqcplayer);
                        if (trace_fraction < 1)
                        {
                                // found an obstacle between view origin and shot tag