From 42bf4347cf34c38a481a44826d6a1a8ecd836b8e Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 1 Dec 2002 08:28:39 +0000 Subject: [PATCH] a few more glquake and glqwcl compatibility fixes git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2661 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_particles.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/cl_particles.c b/cl_particles.c index 76806d57..d5940d17 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -148,6 +148,10 @@ void VectorVectors(const vec3_t forward, vec3_t right, vec3_t up) VectorNormalizeFast(right); CrossProduct(right, forward, up); } +#if QW +#include "pmove.h" +extern qboolean PM_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1, vec3_t p2, pmtrace_t *trace); +#endif float CL_TraceLine (vec3_t start, vec3_t end, vec3_t impact, vec3_t normal, int contents, int hitbmodels, void **hitent) { #if QW @@ -160,7 +164,7 @@ float CL_TraceLine (vec3_t start, vec3_t end, vec3_t impact, vec3_t normal, int trace.fraction = 1; VectorCopy (end, trace.endpos); #if QW - PM_RecursiveHullCheck (move.physents[0].model->hulls, move.physents[0].model->hulls.firstclipnode, 0, 1, start_l, end_l, &trace); + PM_RecursiveHullCheck (cl.model_precache[1]->hulls, 0, 0, 1, start_l, end_l, &trace); #else RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1, start_l, end_l, &trace); #endif @@ -1622,14 +1626,17 @@ void R_InitParticles(void) float varray_vertex[16]; #endif +#ifdef WORKINGLQUAKE +void R_DrawParticle(particle_t *p) +{ +#else void R_DrawParticleCallback(const void *calldata1, int calldata2) { - float org[3], up2[3], v[3], right[3], up[3], fog, ifog, fogvec[3], cr, cg, cb, ca; - particletexture_t *tex; -#ifndef WORKINGLQUAKE + const particle_t *p = calldata1; rmeshstate_t m; #endif - const particle_t *p = calldata1; + float org[3], up2[3], v[3], right[3], up[3], fog, ifog, fogvec[3], cr, cg, cb, ca; + particletexture_t *tex; VectorCopy(p->org, org); @@ -1804,7 +1811,7 @@ void R_DrawParticles (void) // LordHavoc: only render if not too close for (i = 0, p = particles;i < cl_numparticles;i++, p++) if (DotProduct(p->org, vpn) >= minparticledist) - R_DrawParticleCallback(p, 0); + R_DrawParticle(p); glDepthMask(1); glDisable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -- 2.39.2