mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-19 07:00:52 +00:00
- Clamp maximum particle count to 65535.
- Fixed: The inner railgun trail ignored the RGF_FULLBRIGHT flag. SVN r3536 (trunk)
This commit is contained in:
parent
40c906f10d
commit
9ea7eab7e0
2 changed files with 6 additions and 6 deletions
|
@ -151,8 +151,7 @@ void P_InitParticles ()
|
||||||
NumParticles = r_maxparticles;
|
NumParticles = r_maxparticles;
|
||||||
|
|
||||||
// This should be good, but eh...
|
// This should be good, but eh...
|
||||||
if ( NumParticles < 100 )
|
NumParticles = clamp(NumParticles, 100, 65535);
|
||||||
NumParticles = 100;
|
|
||||||
|
|
||||||
P_DeinitParticles();
|
P_DeinitParticles();
|
||||||
Particles = new particle_t[NumParticles];
|
Particles = new particle_t[NumParticles];
|
||||||
|
@ -688,8 +687,7 @@ void P_DrawRailTrail (AActor *source, const FVector3 &start, const FVector3 &end
|
||||||
p->ttl = duration;
|
p->ttl = duration;
|
||||||
p->fade = FADEFROMTTL(duration);
|
p->fade = FADEFROMTTL(duration);
|
||||||
p->size = 3;
|
p->size = 3;
|
||||||
if(fullbright)
|
p->bright = fullbright;
|
||||||
p->bright = true;
|
|
||||||
|
|
||||||
tempvec = FMatrix3x3(dir, deg) * extend;
|
tempvec = FMatrix3x3(dir, deg) * extend;
|
||||||
p->velx = FLOAT2FIXED(tempvec.X * drift)>>4;
|
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;
|
p->accz -= FRACUNIT/4096;
|
||||||
pos += trail_step;
|
pos += trail_step;
|
||||||
|
|
||||||
|
p->bright = fullbright;
|
||||||
|
|
||||||
if (color2 == -1)
|
if (color2 == -1)
|
||||||
{
|
{
|
||||||
int rand = M_Random();
|
int rand = M_Random();
|
||||||
|
|
|
@ -59,13 +59,13 @@ struct particle_t
|
||||||
fixed_t accx,accy,accz;
|
fixed_t accx,accy,accz;
|
||||||
BYTE ttl;
|
BYTE ttl;
|
||||||
BYTE trans;
|
BYTE trans;
|
||||||
BYTE size;
|
BYTE size:7;
|
||||||
|
BYTE bright:1;
|
||||||
BYTE fade;
|
BYTE fade;
|
||||||
int color;
|
int color;
|
||||||
WORD tnext;
|
WORD tnext;
|
||||||
WORD snext;
|
WORD snext;
|
||||||
subsector_t * subsector;
|
subsector_t * subsector;
|
||||||
bool bright;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern particle_t *Particles;
|
extern particle_t *Particles;
|
||||||
|
|
Loading…
Reference in a new issue