]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
warning in case something is wrong with max_shot_distance
authorMartin Taibr <taibr.martin@gmail.com>
Sat, 24 Dec 2016 02:43:54 +0000 (03:43 +0100)
committerMartin Taibr <taibr.martin@gmail.com>
Sat, 24 Dec 2016 02:44:06 +0000 (03:44 +0100)
qcsrc/server/weapons/tracing.qc

index fd78c9120a7f1ea42e5e8678aed2c64a33be8dc4..b85013d9c0c6fc4a7a67fec6fc1049c19b130d57 100644 (file)
@@ -399,9 +399,12 @@ void fireBullet(entity this, vector start, vector dir, float spread, float max_s
                start = trace_endpos;
                entity hit = trace_ent;
 
-               // traced up to max_shot_distance and didn't hit anything at all
                if (trace_fraction == 1.0)
+               {
+                       // should not happen if max_shot_distance is correctly determined by map size
+                       LOG_WARN("traced up to max_shot_distance and didn't hit anything at all");
                        break;
+               }
 
                // When hitting sky, stop.
                if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY)