From 6762e292d02e37a69a807e01493d4e14319cca33 Mon Sep 17 00:00:00 2001 From: xolatile Date: Tue, 5 Aug 2025 01:05:35 +0200 Subject: Do not compile, deleting stuff... --- src/engine/renderparticles.cpp | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'src/engine/renderparticles.cpp') diff --git a/src/engine/renderparticles.cpp b/src/engine/renderparticles.cpp index accc204..5bb709d 100644 --- a/src/engine/renderparticles.cpp +++ b/src/engine/renderparticles.cpp @@ -7,15 +7,12 @@ Shader *particleshader = NULL, *particlenotextureshader = NULL; VARP(particlesize, 20, 100, 500); -// Check canemitparticles() to limit the rate that paricles can be emitted for models/sparklies -// Automatically stops particles being emitted when paused or in reflective drawing VARP(emitmillis, 1, 17, 1000); static int lastemitframe = 0, emitoffset = 0; static bool canemit = false, regenemitters = false, canstep = false; static bool canemitparticles() { - if(reflecting || refracting) return false; return canemit || emitoffset; } @@ -860,7 +857,7 @@ struct softquadrenderer : quadrenderer vec o, d; int blend, ts; calc(&p, blend, ts, o, d, false); - if(!isfoggedsphere(radius, p.o) && (depthfxscissor!=2 || depthfxtex.addscissorbox(p.o, radius))) + if((depthfxscissor!=2 || depthfxtex.addscissorbox(p.o, radius))) { numsoft++; loopk(3) @@ -958,14 +955,10 @@ void removetrackedparticles(physent *owner) loopi(sizeof(parts)/sizeof(parts[0])) parts[i]->resettracked(owner); } -VARP(particleglare, 0, 2, 100); - void renderparticles(bool mainpass) { canstep = mainpass; - if(glaring && !particleglare) return; - loopi(sizeof(parts)/sizeof(parts[0])) { if(glaring && !(parts[i]->type&PT_GLARE)) continue; @@ -981,7 +974,7 @@ void renderparticles(bool mainpass) loopi(sizeof(parts)/sizeof(parts[0])) { partrenderer *p = parts[i]; - if(glaring && !(p->type&PT_GLARE)) continue; + if(!(p->type&PT_GLARE)) continue; if(!p->haswork()) continue; if(!rendered) @@ -991,18 +984,12 @@ void renderparticles(bool mainpass) glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - if(glaring) GLOBALPARAMF(colorscale, particleglare, particleglare, particleglare, 1); - else GLOBALPARAMF(colorscale, 1, 1, 1, 1); + GLOBALPARAMF(colorscale, 1, 1, 1, 1); } uint flags = p->type & flagmask, changedbits = (flags ^ lastflags); if(changedbits) { - if(changedbits&PT_LERP) - { - if(flags&PT_LERP) resetfogcolor(); - else zerofogcolor(); - } if(changedbits&(PT_LERP|PT_MOD)) { if(flags&PT_LERP) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -1032,7 +1019,6 @@ void renderparticles(bool mainpass) if(rendered) { if(lastflags&(PT_LERP|PT_MOD)) glBlendFunc(GL_SRC_ALPHA, GL_ONE); - if(!(lastflags&PT_LERP)) resetfogcolor(); glDisable(GL_BLEND); glDepthMask(GL_TRUE); } @@ -1347,11 +1333,11 @@ static void makeparticles(entity &e) else { int mat = MAT_WATER + clamp(-e.attr3, 0, 3); - const bvec &wfcol = getwaterfallcolor(mat); + const bvec &wfcol = { 0 }; color = (int(wfcol[0])<<16) | (int(wfcol[1])<<8) | int(wfcol[2]); if(!color) { - const bvec &wcol = getwatercolor(mat); + const bvec &wcol = { 0 }; color = (int(wcol[0])<<16) | (int(wcol[1])<<8) | int(wcol[2]); } } @@ -1466,10 +1452,6 @@ void updateparticles() particleemitter &pe = emitters[i]; extentity &e = *pe.ent; if(e.o.dist(camera1->o) > maxparticledistance) { pe.lastemit = lastmillis; continue; } - if(cullparticles && pe.maxfade >= 0) - { - if(isfoggedsphere(pe.radius, pe.center)) { pe.lastcull = lastmillis; continue; } - } makeparticles(e); emitted++; if(replayparticles && pe.maxfade > 5 && pe.lastcull > pe.lastemit) -- cgit v1.2.3