mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2025-02-12 23:05:39 +00:00
Cleaning up some of the ifdefs in the particle code..
Marcus Sundberg, using Mesa with GL support is PREFERED to using the MiniGL!! I have requests from 3Dfx and Zoid to drop support for the MiniGL completely.. Thats now fixed..
This commit is contained in:
parent
cefeaf6ecf
commit
93bd2a180c
2 changed files with 30 additions and 41 deletions
|
@ -141,11 +141,11 @@ void R_EntityParticles (entity_t *ent)
|
||||||
dist = 64;
|
dist = 64;
|
||||||
count = 50;
|
count = 50;
|
||||||
|
|
||||||
if (!avelocities[0][0])
|
if (!avelocities[0][0])
|
||||||
{
|
{
|
||||||
for (i=0 ; i<NUMVERTEXNORMALS*3 ; i++)
|
for (i=0 ; i<NUMVERTEXNORMALS*3 ; i++)
|
||||||
avelocities[0][i] = (rand()&255) * 0.01;
|
avelocities[0][i] = (rand()&255) * 0.01;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (i=0 ; i<NUMVERTEXNORMALS ; i++)
|
for (i=0 ; i<NUMVERTEXNORMALS ; i++)
|
||||||
|
@ -270,10 +270,10 @@ void R_ParseParticleEffect (void)
|
||||||
msgcount = MSG_ReadByte ();
|
msgcount = MSG_ReadByte ();
|
||||||
color = MSG_ReadByte ();
|
color = MSG_ReadByte ();
|
||||||
|
|
||||||
if (msgcount == 255)
|
if (msgcount == 255)
|
||||||
count = 1024;
|
count = 1024;
|
||||||
else
|
else
|
||||||
count = msgcount;
|
count = msgcount;
|
||||||
|
|
||||||
R_RunParticleEffect (org, dir, color, count);
|
R_RunParticleEffect (org, dir, color, count);
|
||||||
}
|
}
|
||||||
|
@ -422,8 +422,7 @@ void R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
|
||||||
scale = 1;
|
scale = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (i=0 ; i<count ; i++)
|
for (i=0 ; i<count ; i++) {
|
||||||
{
|
|
||||||
if (!free_particles)
|
if (!free_particles)
|
||||||
return;
|
return;
|
||||||
p = free_particles;
|
p = free_particles;
|
||||||
|
@ -435,49 +434,39 @@ void R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
|
||||||
p->die = cl.time + 0.1*(rand()%5);
|
p->die = cl.time + 0.1*(rand()%5);
|
||||||
p->color = (color&~7) + (rand()&7);
|
p->color = (color&~7) + (rand()&7);
|
||||||
p->type = pt_grav;
|
p->type = pt_grav;
|
||||||
for (j=0 ; j<3 ; j++)
|
for (j=0 ; j<3 ; j++) {
|
||||||
#else
|
p->org[j] = org[j] + scale*((rand()&15)-8);
|
||||||
if (count == 1024)
|
p->vel[j] = dir[j]*15;// + (rand()%300)-150;
|
||||||
{ // rocket explosion
|
}
|
||||||
|
#elif UQUAKE
|
||||||
|
if (count == 1024) {
|
||||||
|
// rocket explosion
|
||||||
p->die = cl.time + 5;
|
p->die = cl.time + 5;
|
||||||
p->color = ramp1[0];
|
p->color = ramp1[0];
|
||||||
p->ramp = rand()&3;
|
p->ramp = rand()&3;
|
||||||
if (i & 1)
|
if (i & 1) {
|
||||||
{
|
|
||||||
p->type = pt_explode;
|
p->type = pt_explode;
|
||||||
for (j=0 ; j<3 ; j++)
|
for (j=0 ; j<3 ; j++) {
|
||||||
{
|
|
||||||
p->org[j] = org[j] + ((rand()%32)-16);
|
p->org[j] = org[j] + ((rand()%32)-16);
|
||||||
p->vel[j] = (rand()%512)-256;
|
p->vel[j] = (rand()%512)-256;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
p->type = pt_explode2;
|
p->type = pt_explode2;
|
||||||
for (j=0 ; j<3 ; j++)
|
for (j=0 ; j<3 ; j++) {
|
||||||
{
|
|
||||||
p->org[j] = org[j] + ((rand()%32)-16);
|
p->org[j] = org[j] + ((rand()%32)-16);
|
||||||
p->vel[j] = (rand()%512)-256;
|
p->vel[j] = (rand()%512)-256;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
#ifdef QUAKEWORLD
|
|
||||||
p->org[j] = org[j] + scale*((rand()&15)-8);
|
|
||||||
p->vel[j] = dir[j]*15;// + (rand()%300)-150;
|
|
||||||
#else
|
|
||||||
p->die = cl.time + 0.1*(rand()%5);
|
p->die = cl.time + 0.1*(rand()%5);
|
||||||
p->color = (color&~7) + (rand()&7);
|
p->color = (color&~7) + (rand()&7);
|
||||||
p->type = pt_slowgrav;
|
p->type = pt_slowgrav;
|
||||||
for (j=0 ; j<3 ; j++)
|
for (j=0 ; j<3 ; j++) {
|
||||||
{
|
|
||||||
p->org[j] = org[j] + ((rand()&15)-8);
|
p->org[j] = org[j] + ((rand()&15)-8);
|
||||||
p->vel[j] = dir[j]*15;// + (rand()%300)-150;
|
p->vel[j] = dir[j]*15;// + (rand()%300)-150;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -465,7 +465,7 @@ if test "x$HAS_3dfx" != "xno" -a "x$HAS_SVGA" = "xyes" \
|
||||||
fi
|
fi
|
||||||
if test -z "$TDFXGL_NAME"; then
|
if test -z "$TDFXGL_NAME"; then
|
||||||
dnl Check in reverse order of preference
|
dnl Check in reverse order of preference
|
||||||
for a in $OGL_NAME 3dfxgl; do
|
for a in 3dfxgl $OGL_NAME; do
|
||||||
AC_CHECK_LIB($a, fxMesaCreateContext, TDFXGL_NAME=$a, qwfoo=qwfoo,
|
AC_CHECK_LIB($a, fxMesaCreateContext, TDFXGL_NAME=$a, qwfoo=qwfoo,
|
||||||
[$GLIDE_LIBS $TDFXGL_LIBS])
|
[$GLIDE_LIBS $TDFXGL_LIBS])
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue