From a2775d983e9da7235d08a94e4cdd18d8a5a071ce Mon Sep 17 00:00:00 2001 From: sireus Date: Fri, 14 Sep 2012 21:54:38 +0000 Subject: [PATCH] slightly more generous decal offset to reliably prevent z-fighting git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6877 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/renderparticles.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/src/renderparticles.cpp b/source/src/renderparticles.cpp index d48b13fa..78c91e52 100644 --- a/source/src/renderparticles.cpp +++ b/source/src/renderparticles.cpp @@ -615,7 +615,7 @@ bool addbullethole(dynent *d, const vec &from, const vec &to, float radius, bool if(surface.iszero() || (radius>0 && (dist < mag-radius || dist > mag+radius))) return false; vec o(from); o.add(ray.mul(dist)); - o.add(vec(surface).mul(0.005f)); + o.add(vec(surface).normalize().mul(0.01f)); newparticle(o, surface, bulletholettl, 7); if(noisy && bulletbouncesound && bulletbouncesoundrad && d!=player1 && o.dist(camera1->o) <= bulletbouncesoundrad) { @@ -632,7 +632,7 @@ bool addscorchmark(vec &o, float radius) if(!scorchttl || !scorch) return false; sqr *s = S((int)o.x, (int)o.y); if(s->type!=SPACE || o.z-s->floor>radius) return false; - newparticle(vec(o.x, o.y, s->floor+0.005f), vec(0, 0, 1), scorchttl, 9); + newparticle(vec(o.x, o.y, s->floor+0.02f), vec(0, 0, 1), scorchttl, 9); return true; }