mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +00:00
Prettier particles! Renderer is now informed of sv_gravity changes in qw. Not
supportable without protocol changes in nq.
This commit is contained in:
parent
da05864313
commit
c2053fbfb1
6 changed files with 35 additions and 40 deletions
|
@ -260,6 +260,10 @@ void R_ReadPointFile_f (void);
|
||||||
void R_InitSprites (void);
|
void R_InitSprites (void);
|
||||||
void R_SurfacePatch (void);
|
void R_SurfacePatch (void);
|
||||||
|
|
||||||
|
extern float r_gravity;
|
||||||
|
|
||||||
|
// renderer stuff again ===================================
|
||||||
|
|
||||||
extern int r_amodels_drawn;
|
extern int r_amodels_drawn;
|
||||||
extern edge_t *auxedges;
|
extern edge_t *auxedges;
|
||||||
extern int r_numallocatededges;
|
extern int r_numallocatededges;
|
||||||
|
|
|
@ -1363,7 +1363,7 @@ R_DrawParticles (void)
|
||||||
qfglDepthMask (GL_FALSE);
|
qfglDepthMask (GL_FALSE);
|
||||||
qfglInterleavedArrays (GL_T2F_C4UB_V3F, 0, particleVertexArray);
|
qfglInterleavedArrays (GL_T2F_C4UB_V3F, 0, particleVertexArray);
|
||||||
|
|
||||||
grav = (fast_grav = r_frametime * 800.0) * 0.05;
|
grav = (fast_grav = r_frametime * r_gravity) * 0.05;
|
||||||
time_125 = r_frametime * 0.125;
|
time_125 = r_frametime * 0.125;
|
||||||
time_25= r_frametime * 0.25;
|
time_25= r_frametime * 0.25;
|
||||||
time_40 = r_frametime * 0.40;
|
time_40 = r_frametime * 0.40;
|
||||||
|
|
|
@ -73,8 +73,7 @@ R_ReadPointFile_f (void)
|
||||||
{
|
{
|
||||||
QFile *f;
|
QFile *f;
|
||||||
vec3_t org;
|
vec3_t org;
|
||||||
int r;
|
int c, r;
|
||||||
int c;
|
|
||||||
particle_t *p;
|
particle_t *p;
|
||||||
char name[MAX_OSPATH];
|
char name[MAX_OSPATH];
|
||||||
|
|
||||||
|
@ -137,31 +136,25 @@ R_ParticleExplosion_QF (const vec3_t org)
|
||||||
p->die = r_realtime + 5;
|
p->die = r_realtime + 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++) {
|
else
|
||||||
p->org[j] = org[j] + ((rand () % 32) - 16);
|
|
||||||
p->vel[j] = (rand () % 512) - 256;
|
|
||||||
}
|
|
||||||
} 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
R_ParticleExplosion2_QF (const vec3_t org, int colorStart, int colorLength)
|
R_ParticleExplosion2_QF (const vec3_t org, int colorStart, int colorLength)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
particle_t *p;
|
|
||||||
int colorMod = 0;
|
int colorMod = 0;
|
||||||
|
particle_t *p;
|
||||||
|
|
||||||
for (i=0; i<512; i++)
|
for (i=0; i<512; i++) {
|
||||||
{
|
|
||||||
if (!free_particles)
|
if (!free_particles)
|
||||||
return;
|
return;
|
||||||
p = free_particles;
|
p = free_particles;
|
||||||
|
@ -174,8 +167,7 @@ R_ParticleExplosion2_QF (const vec3_t org, int colorStart, int colorLength)
|
||||||
colorMod++;
|
colorMod++;
|
||||||
|
|
||||||
p->type = pt_blob;
|
p->type = pt_blob;
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -204,19 +196,15 @@ R_BlobExplosion_QF (const vec3_t org)
|
||||||
if (i & 1) {
|
if (i & 1) {
|
||||||
p->type = pt_blob;
|
p->type = pt_blob;
|
||||||
p->color = 66 + rand () % 6;
|
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 {
|
} else {
|
||||||
p->type = pt_blob2;
|
p->type = pt_blob2;
|
||||||
p->color = 150 + rand () % 6;
|
p->color = 150 + rand () % 6;
|
||||||
|
}
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -643,13 +631,9 @@ R_VoorTrail_QF (entity_t *ent)
|
||||||
void
|
void
|
||||||
R_DrawParticles (void)
|
R_DrawParticles (void)
|
||||||
{
|
{
|
||||||
particle_t *p, **particle;
|
|
||||||
float grav;
|
|
||||||
int i;
|
int i;
|
||||||
float time2, time3;
|
float dvel, frametime, grav, time1, time2, time3;
|
||||||
float time1;
|
particle_t *p, **particle;
|
||||||
float dvel;
|
|
||||||
float frametime;
|
|
||||||
|
|
||||||
D_StartParticles ();
|
D_StartParticles ();
|
||||||
|
|
||||||
|
@ -661,7 +645,7 @@ R_DrawParticles (void)
|
||||||
time3 = frametime * 15;
|
time3 = frametime * 15;
|
||||||
time2 = frametime * 10; // 15;
|
time2 = frametime * 10; // 15;
|
||||||
time1 = frametime * 5;
|
time1 = frametime * 5;
|
||||||
grav = frametime * 800 * 0.05;
|
grav = frametime * r_gravity * 0.05;
|
||||||
dvel = 4 * frametime;
|
dvel = 4 * frametime;
|
||||||
|
|
||||||
for (particle = &active_particles; *particle;) {
|
for (particle = &active_particles; *particle;) {
|
||||||
|
|
|
@ -661,7 +661,7 @@ R_DrawParticles (void)
|
||||||
time3 = frametime * 15;
|
time3 = frametime * 15;
|
||||||
time2 = frametime * 10; // 15;
|
time2 = frametime * 10; // 15;
|
||||||
time1 = frametime * 5;
|
time1 = frametime * 5;
|
||||||
grav = frametime * 800 * 0.05;
|
grav = frametime * r_gravity * 0.05;
|
||||||
dvel = 4 * frametime;
|
dvel = 4 * frametime;
|
||||||
|
|
||||||
for (particle = &active_particles; *particle;) {
|
for (particle = &active_particles; *particle;) {
|
||||||
|
|
|
@ -103,6 +103,8 @@ const char *svc_strings[] = {
|
||||||
"svc_cutscene"
|
"svc_cutscene"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
float r_gravity;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CL_EntityNum
|
CL_EntityNum
|
||||||
|
@ -236,10 +238,11 @@ map_cfg (const char *mapname, int all)
|
||||||
} else {
|
} else {
|
||||||
Cmd_Exec_File (cbuf, "maps_default.cfg", 1);
|
Cmd_Exec_File (cbuf, "maps_default.cfg", 1);
|
||||||
}
|
}
|
||||||
if (all)
|
if (all) {
|
||||||
Cbuf_Execute_Stack (cbuf);
|
Cbuf_Execute_Stack (cbuf);
|
||||||
else
|
} else {
|
||||||
Cbuf_Execute_Sets (cbuf);
|
Cbuf_Execute_Sets (cbuf);
|
||||||
|
}
|
||||||
free (name);
|
free (name);
|
||||||
Cbuf_Delete (cbuf);
|
Cbuf_Delete (cbuf);
|
||||||
}
|
}
|
||||||
|
@ -352,6 +355,7 @@ CL_ParseServerInfo (void)
|
||||||
Hunk_Check (); // make sure nothing is hurt
|
Hunk_Check (); // make sure nothing is hurt
|
||||||
|
|
||||||
noclip_anglehack = false; // noclip is turned off at start
|
noclip_anglehack = false; // noclip is turned off at start
|
||||||
|
r_gravity = 800.0; // Set up gravity for renderer effects
|
||||||
}
|
}
|
||||||
|
|
||||||
int bitcounts[16];
|
int bitcounts[16];
|
||||||
|
|
|
@ -168,6 +168,8 @@ int cl_h_playerindex, cl_gib1index, cl_gib2index, cl_gib3index;
|
||||||
|
|
||||||
int packet_latency[NET_TIMINGS];
|
int packet_latency[NET_TIMINGS];
|
||||||
|
|
||||||
|
float r_gravity;
|
||||||
|
|
||||||
extern cvar_t *hud_scoreboard_uid;
|
extern cvar_t *hud_scoreboard_uid;
|
||||||
|
|
||||||
|
|
||||||
|
@ -735,6 +737,7 @@ CL_ParseServerData (void)
|
||||||
|
|
||||||
// get the movevars
|
// get the movevars
|
||||||
movevars.gravity = MSG_ReadFloat (net_message);
|
movevars.gravity = MSG_ReadFloat (net_message);
|
||||||
|
r_gravity = movevars.gravity; // Gravity for renderer effects
|
||||||
movevars.stopspeed = MSG_ReadFloat (net_message);
|
movevars.stopspeed = MSG_ReadFloat (net_message);
|
||||||
movevars.maxspeed = MSG_ReadFloat (net_message);
|
movevars.maxspeed = MSG_ReadFloat (net_message);
|
||||||
movevars.spectatormaxspeed = MSG_ReadFloat (net_message);
|
movevars.spectatormaxspeed = MSG_ReadFloat (net_message);
|
||||||
|
|
Loading…
Reference in a new issue