mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
added cl_surprise cvar for easter eggs
This commit is contained in:
parent
c72e2ef324
commit
8d50c8ea47
3 changed files with 33 additions and 12 deletions
|
@ -1,5 +1,6 @@
|
|||
extern struct cvar_s *cl_crossx;
|
||||
extern struct cvar_s *cl_crossy;
|
||||
extern struct cvar_s *cl_surprise;
|
||||
extern struct cvar_s *cl_verstring;
|
||||
extern struct cvar_s *crosshair;
|
||||
extern struct cvar_s *crosshaircolor;
|
||||
|
|
|
@ -428,11 +428,20 @@ R_RocketTrail (entity_t *ent)
|
|||
VectorAdd (ent->old_origin, subtract, ent->old_origin);
|
||||
percent = len * origlen;
|
||||
|
||||
// Misty-chan's Easter Egg: change color to (rand () & 255)
|
||||
particle_new (pt_smoke, part_tex_smoke, ent->old_origin,
|
||||
pscale + percent * 4.0, vec3_origin,
|
||||
r_realtime + 2.0 - percent * 2.0, 12 + (rand () & 3),
|
||||
128 + (rand () & 31) - percent * 100.0);
|
||||
if (cl_surprise->int_val)
|
||||
{
|
||||
particle_new (pt_smoke, part_tex_smoke, ent->old_origin,
|
||||
pscale + percent * 4.0, vec3_origin,
|
||||
r_realtime + 2.0 - percent * 2.0,
|
||||
(rand () & 255),
|
||||
128 + (rand () & 31) - percent * 100.0);
|
||||
} else {
|
||||
particle_new (pt_smoke, part_tex_smoke, ent->old_origin,
|
||||
pscale + percent * 4.0, vec3_origin,
|
||||
r_realtime + 2.0 - percent * 2.0,
|
||||
12 + (rand () & 3),
|
||||
128 + (rand () & 31) - percent * 100.0);
|
||||
}
|
||||
if (numparticles >= r_maxparticles)
|
||||
break;
|
||||
len += dist;
|
||||
|
@ -463,11 +472,19 @@ R_GrenadeTrail (entity_t *ent)
|
|||
VectorAdd (ent->old_origin, subtract, ent->old_origin);
|
||||
percent = len * origlen;
|
||||
|
||||
// Misty-chan's Easter Egg: change color to (rand () & 255)
|
||||
particle_new (pt_smoke, part_tex_smoke, ent->old_origin,
|
||||
pscale + percent * 4.0, vec3_origin,
|
||||
r_realtime + 2.0 - percent * 2.0, (rand () & 3),
|
||||
160 + (rand () & 31) - percent * 100.0);
|
||||
if (cl_surprise->int_val)
|
||||
{
|
||||
particle_new (pt_smoke, part_tex_smoke, ent->old_origin,
|
||||
pscale + percent * 4.0, vec3_origin,
|
||||
r_realtime + 2.0 - percent * 2.0,
|
||||
(rand () & 255),
|
||||
160 + (rand () & 31) - percent * 100.0);
|
||||
} else {
|
||||
particle_new (pt_smoke, part_tex_smoke, ent->old_origin, pscale + percent * 4.0, vec3_origin,
|
||||
r_realtime + 2.0 - percent * 2.0,
|
||||
(rand () & 3),
|
||||
160 + (rand () & 31) - percent * 100.0);
|
||||
}
|
||||
if (numparticles >= r_maxparticles)
|
||||
break;
|
||||
len += dist;
|
||||
|
|
|
@ -44,8 +44,8 @@ static const char rcsid[] =
|
|||
cvar_t *cl_crossx;
|
||||
cvar_t *cl_crossy;
|
||||
cvar_t *cl_max_particles;
|
||||
cvar_t *cl_verstring;
|
||||
|
||||
cvar_t *cl_surprise;
|
||||
cvar_t *cl_verstring;
|
||||
cvar_t *crosshair;
|
||||
cvar_t *crosshaircolor;
|
||||
|
||||
|
@ -148,6 +148,7 @@ cl_max_particles_f (cvar_t *var)
|
|||
void
|
||||
R_Init_Cvars (void)
|
||||
{
|
||||
|
||||
cl_crossx = Cvar_Get ("cl_crossx", "0", CVAR_ARCHIVE, NULL,
|
||||
"Sets the position of the crosshair on the X-axis.");
|
||||
cl_crossy = Cvar_Get ("cl_crossy", "0", CVAR_ARCHIVE, NULL,
|
||||
|
@ -156,6 +157,8 @@ R_Init_Cvars (void)
|
|||
cl_max_particles_f, "Maximum amount of "
|
||||
"particles to display. No maximum, minimum "
|
||||
"is 0.");
|
||||
cl_surprise = Cvar_Get ("cl_surprise", "0", CVAR_NONE, NULL,
|
||||
"Its a surprise, set to 1");
|
||||
cl_verstring = Cvar_Get ("cl_verstring", PROGRAM " " VERSION, CVAR_NONE,
|
||||
NULL, "Client version string");
|
||||
crosshair = Cvar_Get ("crosshair", "0", CVAR_ARCHIVE, NULL, "Crosshair "
|
||||
|
|
Loading…
Reference in a new issue