Added r_speeds profiling and corrected a SW crashing bug.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@656 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-12-15 19:55:22 +00:00
parent 62eeb19311
commit 450ac2a4de
1 changed files with 12 additions and 4 deletions

View File

@ -2837,6 +2837,8 @@ void SWD_DrawParticleBlob(particle_t *p, part_type_t *type)
void DrawParticleTypes (void texturedparticles(particle_t *,part_type_t*), void sparkparticles(particle_t*,part_type_t*), void beamparticlest(beamseg_t*,part_type_t*), void beamparticlesut(beamseg_t*,part_type_t*)) void DrawParticleTypes (void texturedparticles(particle_t *,part_type_t*), void sparkparticles(particle_t*,part_type_t*), void beamparticlest(beamseg_t*,part_type_t*), void beamparticlesut(beamseg_t*,part_type_t*))
{ {
RSpeedMark();
qboolean (*tr) (vec3_t start, vec3_t end, vec3_t impact, vec3_t normal); qboolean (*tr) (vec3_t start, vec3_t end, vec3_t impact, vec3_t normal);
int i; int i;
@ -3151,10 +3153,13 @@ void DrawParticleTypes (void texturedparticles(particle_t *,part_type_t*), void
VectorAdd(stop, oldorg, stop); VectorAdd(stop, oldorg, stop);
VectorScale(stop, 0.5, stop); VectorScale(stop, 0.5, stop);
if (*type->texname) if (beamparticlest!=NULL)
RQ_AddDistReorder((void*)beamparticlest, b, type, stop); {
else if (*type->texname)
RQ_AddDistReorder((void*)beamparticlesut, b, type, stop); RQ_AddDistReorder((void*)beamparticlest, b, type, stop);
else
RQ_AddDistReorder((void*)beamparticlesut, b, type, stop);
}
} }
// if (b->p->die < particletime) // if (b->p->die < particletime)
@ -3176,8 +3181,11 @@ void DrawParticleTypes (void texturedparticles(particle_t *,part_type_t*), void
} }
} }
RSpeedEnd(RSPEED_PARTICLES);
RSpeedRemark();
RQ_RenderDistAndClear(); RQ_RenderDistAndClear();
RSpeedEnd(RSPEED_PARTICLESDRAW);
// lazy delete for particles is done here // lazy delete for particles is done here
if (kill_list) if (kill_list)