From: Martin Taibr Date: Sat, 24 Dec 2016 02:43:54 +0000 (+0100) Subject: warning in case something is wrong with max_shot_distance X-Git-Tag: xonotic-v0.8.2~341^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=210c1eebebf635b57283bc66e2c0cc21d6ac3520;p=xonotic%2Fxonotic-data.pk3dir.git warning in case something is wrong with max_shot_distance --- diff --git a/qcsrc/server/weapons/tracing.qc b/qcsrc/server/weapons/tracing.qc index fd78c9120..b85013d9c 100644 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@ -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)