From: Rudolf Polzer Date: Sat, 4 Dec 2010 19:14:13 +0000 (+0100) Subject: now REALLY stop bullets on weapclip X-Git-Tag: xonotic-v0.1.0preview~69^2~11 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a4d01dea4dca4ce317a86454828aecdb86c5752b;p=xonotic%2Fxonotic-data.pk3dir.git now REALLY stop bullets on weapclip --- diff --git a/qcsrc/server/w_common.qc b/qcsrc/server/w_common.qc index 3be3be202..49e277383 100644 --- a/qcsrc/server/w_common.qc +++ b/qcsrc/server/w_common.qc @@ -451,6 +451,23 @@ void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, f W_BallisticBullet_Hit(); } + // if we hit "weapclip", bail out + // + // rationale of this check: + // + // any shader that is solid, nodraw AND trans is meant to clip weapon + // shots and players, but has no other effect! + // + // if it is not trans, it is caulk and should not have this side effect + // + // matching shaders: + // common/weapclip (intended) + // common/noimpact (is supposed to eat projectiles, but is erased farther above) + if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NODRAW) + if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID) + if not(trace_dphitcontents & DPCONTENTS_OPAQUE) + break; + density = other.ballistics_density; if(density == 0) density = 1;