- Clamp maximum particle count to 65535.

- Fixed: The inner railgun trail ignored the RGF_FULLBRIGHT flag.

SVN r3536 (trunk)
This commit is contained in:
Randy Heit 2012-04-08 04:34:03 +00:00
parent 40c906f10d
commit 9ea7eab7e0
2 changed files with 6 additions and 6 deletions

View file

@ -151,8 +151,7 @@ void P_InitParticles ()
NumParticles = r_maxparticles;
// This should be good, but eh...
if ( NumParticles < 100 )
NumParticles = 100;
NumParticles = clamp(NumParticles, 100, 65535);
P_DeinitParticles();
Particles = new particle_t[NumParticles];
@ -688,8 +687,7 @@ void P_DrawRailTrail (AActor *source, const FVector3 &start, const FVector3 &end
p->ttl = duration;
p->fade = FADEFROMTTL(duration);
p->size = 3;
if(fullbright)
p->bright = true;
p->bright = fullbright;
tempvec = FMatrix3x3(dir, deg) * extend;
p->velx = FLOAT2FIXED(tempvec.X * drift)>>4;
@ -760,6 +758,8 @@ void P_DrawRailTrail (AActor *source, const FVector3 &start, const FVector3 &end
p->accz -= FRACUNIT/4096;
pos += trail_step;
p->bright = fullbright;
if (color2 == -1)
{
int rand = M_Random();

View file

@ -59,13 +59,13 @@ struct particle_t
fixed_t accx,accy,accz;
BYTE ttl;
BYTE trans;
BYTE size;
BYTE size:7;
BYTE bright:1;
BYTE fade;
int color;
WORD tnext;
WORD snext;
subsector_t * subsector;
bool bright;
};
extern particle_t *Particles;