]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Disable some warnings that serve no purpose, fixes #2360
authorMario <mario.mario@y7mail.com>
Mon, 14 Nov 2022 09:31:34 +0000 (19:31 +1000)
committerMario <mario.mario@y7mail.com>
Mon, 14 Nov 2022 09:31:34 +0000 (19:31 +1000)
qcsrc/server/weapons/common.qc

index a00eb120ee8d9fa213e8e8fea68f4241220642bb..2ac69065155074da012f3d6c525b8931964c686e 100644 (file)
@@ -120,11 +120,14 @@ bool SUB_NoImpactCheck(entity this, entity toucher)
        // mirror-impact of something hitting the projectile instead of the
        // projectile hitting the something, or a touchareagrid one. Neither of
        // these stop the projectile from moving, so...
+       // NOTE: this notice is disabled to prevent spam as projectiles can hit content-less objects (other projectiles!)
+#if 0
        if(trace_dphitcontents == 0)
        {
                LOG_TRACEF("A hit from a projectile happened with no hit contents! DEBUG THIS, this should never happen for projectiles! Projectile will self-destruct. (edict: %i, classname: %s, origin: %v)", this, this.classname, this.origin);
                checkclient(this); // TODO: .health is checked in the engine with this, possibly replace with a QC function?
        }
+#endif
     if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
         return true;
     if (toucher == NULL && this.size != '0 0 0')
@@ -135,7 +138,8 @@ bool SUB_NoImpactCheck(entity this, entity toucher)
         traceline(this.origin - tic, this.origin + tic, MOVE_NORMAL, this);
         if (trace_fraction >= 1)
         {
-            LOG_TRACE("Odd... did not hit...?");
+               // NOTE: this notice can occur when projectiles hit non-world objects, better to not spam the console!
+            //LOG_TRACE("Odd... did not hit...?");
         }
         else if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
         {