Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
/*
|
2000-03-24 11:25:06 +00:00
|
|
|
r_part.c
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-04-16 14:26:53 +00:00
|
|
|
particle engine
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-03-24 11:25:06 +00:00
|
|
|
Copyright (C) 1996-1997 Id Software, Inc.
|
|
|
|
Copyright (C) 1999,2000 Nelson Rush.
|
|
|
|
Copyright (C) 1999,2000 contributors of the QuakeForge project
|
|
|
|
Please see the file "AUTHORS" for a list of contributors
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-03-24 11:25:06 +00:00
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-03-24 11:25:06 +00:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
2000-03-24 11:25:06 +00:00
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to:
|
|
|
|
|
|
|
|
Free Software Foundation, Inc.
|
|
|
|
59 Temple Place - Suite 330
|
|
|
|
Boston, MA 02111-1307, USA
|
|
|
|
|
|
|
|
$Id$
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
*/
|
|
|
|
|
2000-02-04 13:40:04 +00:00
|
|
|
#include <quakedef.h>
|
|
|
|
#include <r_local.h>
|
2000-01-29 18:46:26 +00:00
|
|
|
#include <mathlib.h>
|
|
|
|
#include <lib_replace.h>
|
|
|
|
#include <console.h>
|
2000-02-04 13:40:04 +00:00
|
|
|
#include <server.h>
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
#define MAX_PARTICLES 2048 // default max # of particles at one
|
2000-08-20 13:33:48 +00:00
|
|
|
// time
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
#define ABSOLUTE_MIN_PARTICLES 512 // no fewer than this no matter what's
|
2000-08-20 13:33:48 +00:00
|
|
|
// on the command line
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
int ramp1[8] = {0x6f, 0x6d, 0x6b, 0x69, 0x67, 0x65, 0x63, 0x61};
|
|
|
|
int ramp2[8] = {0x6f, 0x6e, 0x6d, 0x6c, 0x6b, 0x6a, 0x68, 0x66};
|
|
|
|
int ramp3[8] = {0x6d, 0x6b, 6, 5, 4, 3};
|
|
|
|
|
|
|
|
particle_t *active_particles, *free_particles;
|
|
|
|
|
|
|
|
particle_t *particles;
|
|
|
|
int r_numparticles;
|
|
|
|
|
|
|
|
vec3_t r_pright, r_pup, r_ppn;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
===============
|
|
|
|
R_InitParticles
|
|
|
|
===============
|
|
|
|
*/
|
2000-08-20 13:33:48 +00:00
|
|
|
void
|
|
|
|
R_InitParticles ( void )
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
i = COM_CheckParm ("-particles");
|
|
|
|
|
|
|
|
if (i)
|
|
|
|
{
|
|
|
|
r_numparticles = (int)(Q_atoi(com_argv[i+1]));
|
|
|
|
if (r_numparticles < ABSOLUTE_MIN_PARTICLES)
|
|
|
|
r_numparticles = ABSOLUTE_MIN_PARTICLES;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
r_numparticles = MAX_PARTICLES;
|
|
|
|
}
|
|
|
|
|
|
|
|
particles = (particle_t *)
|
|
|
|
Hunk_AllocName (r_numparticles * sizeof(particle_t), "particles");
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef QUAKE2
|
2000-08-20 13:33:48 +00:00
|
|
|
void
|
|
|
|
R_DarkFieldParticles ( entity_t *ent )
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
{
|
|
|
|
int i, j, k;
|
|
|
|
particle_t *p;
|
|
|
|
float vel;
|
|
|
|
vec3_t dir;
|
|
|
|
vec3_t org;
|
|
|
|
|
|
|
|
org[0] = ent->origin[0];
|
|
|
|
org[1] = ent->origin[1];
|
|
|
|
org[2] = ent->origin[2];
|
|
|
|
for (i=-16 ; i<16 ; i+=8)
|
|
|
|
for (j=-16 ; j<16 ; j+=8)
|
|
|
|
for (k=0 ; k<32 ; k+=8)
|
|
|
|
{
|
|
|
|
if (!free_particles)
|
|
|
|
return;
|
|
|
|
p = free_particles;
|
|
|
|
free_particles = p->next;
|
|
|
|
p->next = active_particles;
|
|
|
|
active_particles = p;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->die = cl.time + 0.2 + (rand()&7) * 0.02;
|
|
|
|
p->color = 150 + rand()%6;
|
|
|
|
p->type = pt_slowgrav;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
dir[0] = j*8;
|
|
|
|
dir[1] = i*8;
|
|
|
|
dir[2] = k*8;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->org[0] = org[0] + i + (rand()&3);
|
|
|
|
p->org[1] = org[1] + j + (rand()&3);
|
|
|
|
p->org[2] = org[2] + k + (rand()&3);
|
2000-03-19 15:59:51 +00:00
|
|
|
|
2000-08-20 13:33:48 +00:00
|
|
|
VectorNormalize (dir);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
vel = 50 + (rand()&63);
|
|
|
|
VectorScale (dir, vel, p->vel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
===============
|
|
|
|
R_EntityParticles
|
|
|
|
===============
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define NUMVERTEXNORMALS 162
|
|
|
|
extern float r_avertexnormals[NUMVERTEXNORMALS][3];
|
|
|
|
vec3_t avelocities[NUMVERTEXNORMALS];
|
|
|
|
float beamlength = 16;
|
|
|
|
vec3_t avelocity = {23, 7, 3};
|
|
|
|
float partstep = 0.01;
|
|
|
|
float timescale = 0.01;
|
|
|
|
|
2000-08-20 13:33:48 +00:00
|
|
|
void
|
|
|
|
R_EntityParticles ( entity_t *ent )
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
{
|
|
|
|
int count;
|
|
|
|
int i;
|
|
|
|
particle_t *p;
|
|
|
|
float angle;
|
|
|
|
float sr, sp, sy, cr, cp, cy;
|
|
|
|
vec3_t forward;
|
|
|
|
float dist;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
dist = 64;
|
|
|
|
count = 50;
|
|
|
|
|
2000-03-20 04:35:11 +00:00
|
|
|
if (!avelocities[0][0])
|
|
|
|
{
|
|
|
|
for (i=0 ; i<NUMVERTEXNORMALS*3 ; i++)
|
|
|
|
avelocities[0][i] = (rand()&255) * 0.01;
|
|
|
|
}
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
for (i=0 ; i<NUMVERTEXNORMALS ; i++)
|
|
|
|
{
|
|
|
|
angle = cl.time * avelocities[i][0];
|
|
|
|
sy = sin(angle);
|
|
|
|
cy = cos(angle);
|
|
|
|
angle = cl.time * avelocities[i][1];
|
|
|
|
sp = sin(angle);
|
|
|
|
cp = cos(angle);
|
|
|
|
angle = cl.time * avelocities[i][2];
|
|
|
|
sr = sin(angle);
|
|
|
|
cr = cos(angle);
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
forward[0] = cp*cy;
|
|
|
|
forward[1] = cp*sy;
|
|
|
|
forward[2] = -sp;
|
|
|
|
|
|
|
|
if (!free_particles)
|
|
|
|
return;
|
|
|
|
p = free_particles;
|
|
|
|
free_particles = p->next;
|
|
|
|
p->next = active_particles;
|
|
|
|
active_particles = p;
|
|
|
|
|
|
|
|
p->die = cl.time + 0.01;
|
|
|
|
p->color = 0x6f;
|
|
|
|
p->type = pt_explode;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
2000-08-20 13:33:48 +00:00
|
|
|
p->org[0] = ent->origin[0] + r_avertexnormals[i][0]*dist + forward[0]*beamlength;
|
|
|
|
p->org[1] = ent->origin[1] + r_avertexnormals[i][1]*dist + forward[1]*beamlength;
|
|
|
|
p->org[2] = ent->origin[2] + r_avertexnormals[i][2]*dist + forward[2]*beamlength;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
===============
|
|
|
|
R_ClearParticles
|
|
|
|
===============
|
|
|
|
*/
|
2000-08-20 13:33:48 +00:00
|
|
|
void
|
|
|
|
R_ClearParticles ( void )
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
{
|
|
|
|
int i;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
free_particles = &particles[0];
|
|
|
|
active_particles = NULL;
|
|
|
|
|
|
|
|
for (i=0 ;i<r_numparticles ; i++)
|
|
|
|
particles[i].next = &particles[i+1];
|
|
|
|
particles[r_numparticles-1].next = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-08-20 13:33:48 +00:00
|
|
|
void
|
|
|
|
R_ReadPointFile_f ( void )
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
{
|
2000-02-08 05:06:58 +00:00
|
|
|
QFile *f;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
vec3_t org;
|
|
|
|
int r;
|
|
|
|
int c;
|
|
|
|
particle_t *p;
|
|
|
|
char name[MAX_OSPATH];
|
2000-02-03 00:34:12 +00:00
|
|
|
char buf[256];
|
2000-03-19 15:59:51 +00:00
|
|
|
|
2000-02-21 08:12:35 +00:00
|
|
|
// FIXME snprintf(name, sizeof(name),"maps/%s.pts", sv.name);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
COM_FOpenFile (name, &f);
|
|
|
|
if (!f)
|
|
|
|
{
|
|
|
|
Con_Printf ("couldn't open %s\n", name);
|
|
|
|
return;
|
|
|
|
}
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
Con_Printf ("Reading %s...\n", name);
|
|
|
|
c = 0;
|
|
|
|
for ( ;; )
|
|
|
|
{
|
2000-02-08 05:06:58 +00:00
|
|
|
if (!Qgets(f,buf,sizeof(buf)))
|
2000-02-03 00:34:12 +00:00
|
|
|
break;
|
|
|
|
r = sscanf (buf,"%f %f %f\n", &org[0], &org[1], &org[2]);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
if (r != 3)
|
|
|
|
break;
|
|
|
|
c++;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
if (!free_particles)
|
|
|
|
{
|
|
|
|
Con_Printf ("Not enough free particles\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
p = free_particles;
|
|
|
|
free_particles = p->next;
|
|
|
|
p->next = active_particles;
|
|
|
|
active_particles = p;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->die = 99999;
|
|
|
|
p->color = (-c)&15;
|
|
|
|
p->type = pt_static;
|
|
|
|
VectorCopy (vec3_origin, p->vel);
|
|
|
|
VectorCopy (org, p->org);
|
|
|
|
}
|
|
|
|
|
2000-02-08 05:06:58 +00:00
|
|
|
Qclose (f);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
Con_Printf ("%i points read\n", c);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
===============
|
|
|
|
R_ParseParticleEffect
|
|
|
|
|
|
|
|
Parse an effect out of the server message
|
|
|
|
===============
|
|
|
|
*/
|
2000-08-20 13:33:48 +00:00
|
|
|
void
|
|
|
|
R_ParseParticleEffect ( void )
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
{
|
|
|
|
vec3_t org, dir;
|
|
|
|
int i, count, msgcount, color;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
for (i=0 ; i<3 ; i++)
|
|
|
|
org[i] = MSG_ReadCoord ();
|
|
|
|
for (i=0 ; i<3 ; i++)
|
|
|
|
dir[i] = MSG_ReadChar () * (1.0/16);
|
|
|
|
msgcount = MSG_ReadByte ();
|
|
|
|
color = MSG_ReadByte ();
|
|
|
|
|
2000-03-20 04:35:11 +00:00
|
|
|
if (msgcount == 255)
|
|
|
|
count = 1024;
|
|
|
|
else
|
|
|
|
count = msgcount;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
R_RunParticleEffect (org, dir, color, count);
|
|
|
|
}
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
/*
|
|
|
|
===============
|
|
|
|
R_ParticleExplosion
|
|
|
|
|
|
|
|
===============
|
|
|
|
*/
|
2000-08-20 13:33:48 +00:00
|
|
|
void
|
|
|
|
R_ParticleExplosion ( vec3_t org )
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
{
|
|
|
|
int i, j;
|
|
|
|
particle_t *p;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
for (i=0 ; i<1024 ; i++)
|
|
|
|
{
|
|
|
|
if (!free_particles)
|
|
|
|
return;
|
|
|
|
p = free_particles;
|
|
|
|
free_particles = p->next;
|
|
|
|
p->next = active_particles;
|
|
|
|
active_particles = p;
|
|
|
|
|
|
|
|
p->die = cl.time + 5;
|
|
|
|
p->color = ramp1[0];
|
|
|
|
p->ramp = rand()&3;
|
|
|
|
if (i & 1)
|
|
|
|
{
|
|
|
|
p->type = pt_explode;
|
|
|
|
for (j=0 ; j<3 ; j++)
|
|
|
|
{
|
|
|
|
p->org[j] = org[j] + ((rand()%32)-16);
|
|
|
|
p->vel[j] = (rand()%512)-256;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
p->type = pt_explode2;
|
|
|
|
for (j=0 ; j<3 ; j++)
|
|
|
|
{
|
|
|
|
p->org[j] = org[j] + ((rand()%32)-16);
|
|
|
|
p->vel[j] = (rand()%512)-256;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
===============
|
|
|
|
R_ParticleExplosion2
|
|
|
|
|
|
|
|
===============
|
|
|
|
*/
|
2000-08-20 13:33:48 +00:00
|
|
|
void
|
|
|
|
R_ParticleExplosion2 ( vec3_t org, int colorStart, int colorLength )
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
{
|
|
|
|
int i, j;
|
|
|
|
particle_t *p;
|
|
|
|
int colorMod = 0;
|
|
|
|
|
|
|
|
for (i=0; i<512; i++)
|
|
|
|
{
|
|
|
|
if (!free_particles)
|
|
|
|
return;
|
|
|
|
p = free_particles;
|
|
|
|
free_particles = p->next;
|
|
|
|
p->next = active_particles;
|
|
|
|
active_particles = p;
|
|
|
|
|
|
|
|
p->die = cl.time + 0.3;
|
|
|
|
p->color = colorStart + (colorMod % colorLength);
|
|
|
|
colorMod++;
|
|
|
|
|
|
|
|
p->type = pt_blob;
|
|
|
|
for (j=0 ; j<3 ; j++)
|
|
|
|
{
|
|
|
|
p->org[j] = org[j] + ((rand()%32)-16);
|
|
|
|
p->vel[j] = (rand()%512)-256;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
===============
|
|
|
|
R_BlobExplosion
|
|
|
|
|
|
|
|
===============
|
|
|
|
*/
|
2000-08-20 13:33:48 +00:00
|
|
|
void
|
|
|
|
R_BlobExplosion ( vec3_t org )
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
{
|
|
|
|
int i, j;
|
|
|
|
particle_t *p;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
for (i=0 ; i<1024 ; i++)
|
|
|
|
{
|
|
|
|
if (!free_particles)
|
|
|
|
return;
|
|
|
|
p = free_particles;
|
|
|
|
free_particles = p->next;
|
|
|
|
p->next = active_particles;
|
|
|
|
active_particles = p;
|
|
|
|
|
|
|
|
p->die = cl.time + 1 + (rand()&8)*0.05;
|
|
|
|
|
|
|
|
if (i & 1)
|
|
|
|
{
|
|
|
|
p->type = pt_blob;
|
|
|
|
p->color = 66 + rand()%6;
|
|
|
|
for (j=0 ; j<3 ; j++)
|
|
|
|
{
|
|
|
|
p->org[j] = org[j] + ((rand()%32)-16);
|
|
|
|
p->vel[j] = (rand()%512)-256;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
p->type = pt_blob2;
|
|
|
|
p->color = 150 + rand()%6;
|
|
|
|
for (j=0 ; j<3 ; j++)
|
|
|
|
{
|
|
|
|
p->org[j] = org[j] + ((rand()%32)-16);
|
|
|
|
p->vel[j] = (rand()%512)-256;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
===============
|
|
|
|
R_RunParticleEffect
|
|
|
|
|
|
|
|
===============
|
|
|
|
*/
|
2000-08-20 13:33:48 +00:00
|
|
|
void
|
|
|
|
R_RunParticleEffect ( vec3_t org, vec3_t dir, int color, int count )
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
{
|
|
|
|
int i, j;
|
|
|
|
particle_t *p;
|
2000-02-21 08:12:35 +00:00
|
|
|
#ifdef QUAKEWORLD
|
|
|
|
int scale;
|
|
|
|
|
|
|
|
if (count > 130)
|
|
|
|
scale = 3;
|
|
|
|
else if (count > 20)
|
|
|
|
scale = 2;
|
|
|
|
else
|
|
|
|
scale = 1;
|
|
|
|
#endif
|
2000-08-20 13:33:48 +00:00
|
|
|
|
2000-03-20 04:35:11 +00:00
|
|
|
for (i=0 ; i<count ; i++) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
if (!free_particles)
|
|
|
|
return;
|
|
|
|
p = free_particles;
|
|
|
|
free_particles = p->next;
|
|
|
|
p->next = active_particles;
|
|
|
|
active_particles = p;
|
|
|
|
|
2000-02-21 08:12:35 +00:00
|
|
|
#ifdef QUAKEWORLD
|
|
|
|
p->die = cl.time + 0.1*(rand()%5);
|
|
|
|
p->color = (color&~7) + (rand()&7);
|
|
|
|
p->type = pt_grav;
|
2000-03-20 04:35:11 +00:00
|
|
|
for (j=0 ; j<3 ; j++) {
|
|
|
|
p->org[j] = org[j] + scale*((rand()&15)-8);
|
|
|
|
p->vel[j] = dir[j]*15;// + (rand()%300)-150;
|
|
|
|
}
|
|
|
|
#elif UQUAKE
|
|
|
|
if (count == 1024) {
|
|
|
|
// rocket explosion
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->die = cl.time + 5;
|
|
|
|
p->color = ramp1[0];
|
|
|
|
p->ramp = rand()&3;
|
2000-03-20 04:35:11 +00:00
|
|
|
if (i & 1) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->type = pt_explode;
|
2000-03-20 04:35:11 +00:00
|
|
|
for (j=0 ; j<3 ; j++) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->org[j] = org[j] + ((rand()%32)-16);
|
|
|
|
p->vel[j] = (rand()%512)-256;
|
|
|
|
}
|
2000-03-20 04:35:11 +00:00
|
|
|
} else {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->type = pt_explode2;
|
2000-03-20 04:35:11 +00:00
|
|
|
for (j=0 ; j<3 ; j++) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->org[j] = org[j] + ((rand()%32)-16);
|
|
|
|
p->vel[j] = (rand()%512)-256;
|
|
|
|
}
|
|
|
|
}
|
2000-03-20 04:35:11 +00:00
|
|
|
} else {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->die = cl.time + 0.1*(rand()%5);
|
|
|
|
p->color = (color&~7) + (rand()&7);
|
|
|
|
p->type = pt_slowgrav;
|
2000-03-20 04:35:11 +00:00
|
|
|
for (j=0 ; j<3 ; j++) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->org[j] = org[j] + ((rand()&15)-8);
|
|
|
|
p->vel[j] = dir[j]*15;// + (rand()%300)-150;
|
|
|
|
}
|
|
|
|
}
|
2000-03-20 04:35:11 +00:00
|
|
|
#endif
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
===============
|
|
|
|
R_LavaSplash
|
|
|
|
|
|
|
|
===============
|
|
|
|
*/
|
2000-08-20 13:33:48 +00:00
|
|
|
void
|
|
|
|
R_LavaSplash ( vec3_t org )
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
{
|
|
|
|
int i, j, k;
|
|
|
|
particle_t *p;
|
|
|
|
float vel;
|
|
|
|
vec3_t dir;
|
|
|
|
|
|
|
|
for (i=-16 ; i<16 ; i++)
|
|
|
|
for (j=-16 ; j<16 ; j++)
|
|
|
|
for (k=0 ; k<1 ; k++)
|
|
|
|
{
|
|
|
|
if (!free_particles)
|
|
|
|
return;
|
|
|
|
p = free_particles;
|
|
|
|
free_particles = p->next;
|
|
|
|
p->next = active_particles;
|
|
|
|
active_particles = p;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->die = cl.time + 2 + (rand()&31) * 0.02;
|
|
|
|
p->color = 224 + (rand()&7);
|
2000-02-21 08:12:35 +00:00
|
|
|
#ifdef QUAKEWORLD
|
|
|
|
p->type = pt_grav;
|
|
|
|
#else
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->type = pt_slowgrav;
|
2000-02-21 08:12:35 +00:00
|
|
|
#endif
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
dir[0] = j*8 + (rand()&7);
|
|
|
|
dir[1] = i*8 + (rand()&7);
|
|
|
|
dir[2] = 256;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->org[0] = org[0] + dir[0];
|
|
|
|
p->org[1] = org[1] + dir[1];
|
|
|
|
p->org[2] = org[2] + (rand()&63);
|
2000-03-19 15:59:51 +00:00
|
|
|
|
|
|
|
VectorNormalize (dir);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
vel = 50 + (rand()&63);
|
|
|
|
VectorScale (dir, vel, p->vel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
===============
|
|
|
|
R_TeleportSplash
|
|
|
|
|
|
|
|
===============
|
|
|
|
*/
|
2000-08-20 13:33:48 +00:00
|
|
|
void
|
|
|
|
R_TeleportSplash ( vec3_t org )
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
{
|
|
|
|
int i, j, k;
|
|
|
|
particle_t *p;
|
|
|
|
float vel;
|
|
|
|
vec3_t dir;
|
|
|
|
|
|
|
|
for (i=-16 ; i<16 ; i+=4)
|
|
|
|
for (j=-16 ; j<16 ; j+=4)
|
|
|
|
for (k=-24 ; k<32 ; k+=4)
|
|
|
|
{
|
|
|
|
if (!free_particles)
|
|
|
|
return;
|
|
|
|
p = free_particles;
|
|
|
|
free_particles = p->next;
|
|
|
|
p->next = active_particles;
|
|
|
|
active_particles = p;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->die = cl.time + 0.2 + (rand()&7) * 0.02;
|
|
|
|
p->color = 7 + (rand()&7);
|
2000-02-21 08:12:35 +00:00
|
|
|
#ifdef QUAKEWORLD
|
|
|
|
p->type = pt_grav;
|
|
|
|
#else
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->type = pt_slowgrav;
|
2000-02-21 08:12:35 +00:00
|
|
|
#endif
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
dir[0] = j*8;
|
|
|
|
dir[1] = i*8;
|
|
|
|
dir[2] = k*8;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->org[0] = org[0] + i + (rand()&3);
|
|
|
|
p->org[1] = org[1] + j + (rand()&3);
|
|
|
|
p->org[2] = org[2] + k + (rand()&3);
|
2000-03-19 15:59:51 +00:00
|
|
|
|
|
|
|
VectorNormalize (dir);
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
vel = 50 + (rand()&63);
|
|
|
|
VectorScale (dir, vel, p->vel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-03-10 23:18:46 +00:00
|
|
|
/*
|
|
|
|
R_RocketTrail
|
|
|
|
*/
|
|
|
|
void
|
2000-08-20 13:33:48 +00:00
|
|
|
R_RocketTrail ( vec3_t start, vec3_t end, int type, entity_t *ent )
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
{
|
|
|
|
vec3_t vec;
|
|
|
|
float len;
|
2000-04-08 10:38:33 +00:00
|
|
|
int j;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
particle_t *p;
|
2000-04-08 10:38:33 +00:00
|
|
|
int dec;
|
|
|
|
static int tracercount;
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
|
|
|
|
VectorSubtract (end, start, vec);
|
|
|
|
len = VectorNormalize (vec);
|
2000-04-08 10:38:33 +00:00
|
|
|
if (type < 128) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
dec = 3;
|
2000-04-08 10:38:33 +00:00
|
|
|
} else {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
dec = 1;
|
|
|
|
type -= 128;
|
|
|
|
}
|
|
|
|
|
2000-04-08 10:38:33 +00:00
|
|
|
while (len > 0) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
len -= dec;
|
|
|
|
|
|
|
|
if (!free_particles)
|
|
|
|
return;
|
|
|
|
p = free_particles;
|
|
|
|
free_particles = p->next;
|
|
|
|
p->next = active_particles;
|
|
|
|
active_particles = p;
|
2000-03-19 15:59:51 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
VectorCopy (vec3_origin, p->vel);
|
|
|
|
p->die = cl.time + 2;
|
|
|
|
|
2000-02-21 08:12:35 +00:00
|
|
|
switch (type) {
|
2000-04-08 10:38:33 +00:00
|
|
|
case 0: // rocket trail
|
|
|
|
p->ramp = (rand()&3);
|
|
|
|
p->color = ramp3[(int)p->ramp];
|
|
|
|
p->type = pt_fire;
|
|
|
|
for (j=0 ; j<3 ; j++)
|
|
|
|
p->org[j] = start[j] + ((rand()%6)-3);
|
|
|
|
break;
|
|
|
|
case 1: // smoke smoke
|
|
|
|
p->ramp = (rand()&3) + 2;
|
|
|
|
p->color = ramp3[(int)p->ramp];
|
|
|
|
p->type = pt_fire;
|
|
|
|
for (j=0 ; j<3 ; j++)
|
|
|
|
p->org[j] = start[j] + ((rand()%6)-3);
|
|
|
|
break;
|
|
|
|
case 2: // blood
|
2000-02-21 08:12:35 +00:00
|
|
|
#ifdef QUAKEWORLD
|
2000-04-08 10:38:33 +00:00
|
|
|
p->type = pt_slowgrav;
|
2000-02-21 08:12:35 +00:00
|
|
|
#else
|
2000-04-08 10:38:33 +00:00
|
|
|
p->type = pt_grav;
|
2000-02-21 08:12:35 +00:00
|
|
|
#endif
|
2000-04-08 10:38:33 +00:00
|
|
|
p->color = 67 + (rand()&3);
|
|
|
|
for (j=0 ; j<3 ; j++)
|
|
|
|
p->org[j] = start[j] + ((rand()%6)-3);
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
case 5: // tracer
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->die = cl.time + 0.5;
|
|
|
|
p->type = pt_static;
|
2000-04-08 10:38:33 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
if (type == 3)
|
|
|
|
p->color = 52 + ((tracercount&4)<<1);
|
|
|
|
else
|
|
|
|
p->color = 230 + ((tracercount&4)<<1);
|
2000-02-21 08:12:35 +00:00
|
|
|
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
tracercount++;
|
|
|
|
|
|
|
|
VectorCopy (start, p->org);
|
2000-02-21 08:12:35 +00:00
|
|
|
if (tracercount & 1) {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->vel[0] = 30*vec[1];
|
|
|
|
p->vel[1] = 30*-vec[0];
|
2000-02-21 08:12:35 +00:00
|
|
|
} else {
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->vel[0] = 30*-vec[1];
|
|
|
|
p->vel[1] = 30*vec[0];
|
|
|
|
}
|
2000-04-08 10:38:33 +00:00
|
|
|
break;
|
|
|
|
case 4: // slight blood
|
2000-02-21 08:12:35 +00:00
|
|
|
#ifdef QUAKEWORLD
|
2000-04-08 10:38:33 +00:00
|
|
|
p->type = pt_slowgrav;
|
2000-02-21 08:12:35 +00:00
|
|
|
#else
|
2000-04-08 10:38:33 +00:00
|
|
|
p->type = pt_grav;
|
2000-02-21 08:12:35 +00:00
|
|
|
#endif
|
2000-04-08 10:38:33 +00:00
|
|
|
p->color = 67 + (rand()&3);
|
|
|
|
for (j=0 ; j<3 ; j++)
|
|
|
|
p->org[j] = start[j] + ((rand()%6)-3);
|
|
|
|
len -= 3;
|
|
|
|
break;
|
|
|
|
case 6: // voor trail
|
Created new subdir: uquake. Pick your favorite U word for the meaning --
Unchained, Ultimate, Ultra, Up Yours, Underworld, Underground, Unified,
Unity, etc. You know the drill.
This takes care of the "standalone" problem with the wrong name, and the
recent snafu with multiple developers working on the same files
simultaneously...expect me (and probably others) to start locking dirs when
updates are taking place.
And yes, this update is really as large as it looks. Software only at the
moment, but I will have the makefile updated to build the GL builds as
well.
1999-12-26 13:51:52 +00:00
|
|
|
p->color = 9*16 + 8 + (rand()&3);
|
|
|
|
p->type = pt_static;
|
|
|
|
p->die = cl.time + 0.3;
|
|
|
|
for (j=0 ; j<3 ; j++)
|
|
|
|
p->org[j] = start[j] + ((rand()&15)-8);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
VectorAdd (start, vec, start);
|
|
|
|
}
|
|
|
|
}
|
2000-04-16 14:26:53 +00:00
|
|
|
|
|
|
|
#ifdef UQUAKE
|
2000-08-20 13:33:48 +00:00
|
|
|
extern cvar_t *sv_gravity;
|
2000-04-16 14:26:53 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
===============
|
|
|
|
R_DrawParticles
|
|
|
|
===============
|
|
|
|
*/
|
2000-08-20 13:33:48 +00:00
|
|
|
void
|
|
|
|
R_DrawParticles ( void )
|
2000-04-16 14:26:53 +00:00
|
|
|
{
|
|
|
|
particle_t *p, *kill;
|
|
|
|
float grav;
|
|
|
|
int i;
|
|
|
|
float time2, time3;
|
|
|
|
float time1;
|
|
|
|
float dvel;
|
|
|
|
float frametime;
|
|
|
|
D_StartParticles ();
|
|
|
|
|
|
|
|
VectorScale (vright, xscaleshrink, r_pright);
|
|
|
|
VectorScale (vup, yscaleshrink, r_pup);
|
|
|
|
VectorCopy (vpn, r_ppn);
|
|
|
|
|
|
|
|
#ifdef QUAKEWORLD
|
|
|
|
frametime = host_frametime;
|
|
|
|
#else
|
|
|
|
frametime = cl.time - cl.oldtime;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
time3 = frametime * 15;
|
2000-08-20 13:33:48 +00:00
|
|
|
time2 = frametime * 10; // 15;
|
2000-04-16 14:26:53 +00:00
|
|
|
time1 = frametime * 5;
|
|
|
|
#ifdef QUAKEWORLD
|
|
|
|
grav = frametime * 800 * 0.05;
|
|
|
|
#else
|
|
|
|
grav = frametime * sv_gravity->value * 0.05;
|
|
|
|
#endif
|
|
|
|
dvel = 4*frametime;
|
|
|
|
|
|
|
|
for ( ;; )
|
|
|
|
{
|
|
|
|
kill = active_particles;
|
|
|
|
if (kill && kill->die < cl.time)
|
|
|
|
{
|
|
|
|
active_particles = kill->next;
|
|
|
|
kill->next = free_particles;
|
|
|
|
free_particles = kill;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (p=active_particles ; p ; p=p->next)
|
|
|
|
{
|
|
|
|
for ( ;; )
|
|
|
|
{
|
|
|
|
kill = p->next;
|
|
|
|
if (kill && kill->die < cl.time)
|
|
|
|
{
|
|
|
|
p->next = kill->next;
|
|
|
|
kill->next = free_particles;
|
|
|
|
free_particles = kill;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
D_DrawParticle (p);
|
|
|
|
|
|
|
|
p->org[0] += p->vel[0]*frametime;
|
|
|
|
p->org[1] += p->vel[1]*frametime;
|
|
|
|
p->org[2] += p->vel[2]*frametime;
|
|
|
|
|
|
|
|
switch (p->type)
|
|
|
|
{
|
|
|
|
case pt_static:
|
|
|
|
break;
|
|
|
|
case pt_fire:
|
|
|
|
p->ramp += time1;
|
|
|
|
if (p->ramp >= 6)
|
|
|
|
p->die = -1;
|
|
|
|
else
|
|
|
|
p->color = ramp3[(int)p->ramp];
|
|
|
|
p->vel[2] += grav;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case pt_explode:
|
|
|
|
p->ramp += time2;
|
|
|
|
if (p->ramp >=8)
|
|
|
|
p->die = -1;
|
|
|
|
else
|
|
|
|
p->color = ramp1[(int)p->ramp];
|
|
|
|
for (i=0 ; i<3 ; i++)
|
|
|
|
p->vel[i] += p->vel[i]*dvel;
|
|
|
|
p->vel[2] -= grav;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case pt_explode2:
|
|
|
|
p->ramp += time3;
|
|
|
|
if (p->ramp >=8)
|
|
|
|
p->die = -1;
|
|
|
|
else
|
|
|
|
p->color = ramp2[(int)p->ramp];
|
|
|
|
for (i=0 ; i<3 ; i++)
|
|
|
|
p->vel[i] -= p->vel[i]*frametime;
|
|
|
|
p->vel[2] -= grav;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case pt_blob:
|
|
|
|
for (i=0 ; i<3 ; i++)
|
|
|
|
p->vel[i] += p->vel[i]*dvel;
|
|
|
|
p->vel[2] -= grav;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case pt_blob2:
|
|
|
|
for (i=0 ; i<2 ; i++)
|
|
|
|
p->vel[i] -= p->vel[i]*dvel;
|
|
|
|
p->vel[2] -= grav;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case pt_slowgrav:
|
|
|
|
case pt_grav:
|
|
|
|
p->vel[2] -= grav;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
D_EndParticles ();
|
|
|
|
}
|