- Changed endsize to sizestep. Endsize affected more things than I thought it would.

This commit is contained in:
MajorCooke 2016-06-11 08:05:29 -05:00
parent ebe3f23677
commit fb286d1737
4 changed files with 6 additions and 6 deletions

View file

@ -321,7 +321,7 @@ enum PSFlag
}; };
void P_SpawnParticle(const DVector3 &pos, const DVector3 &vel, const DVector3 &accel, PalEntry color, double startalpha, int lifetime, double size, void P_SpawnParticle(const DVector3 &pos, const DVector3 &vel, const DVector3 &accel, PalEntry color, double startalpha, int lifetime, double size,
double fadestep, double endsize, int flags) double fadestep, double sizestep, int flags)
{ {
particle_t *particle = NewParticle(); particle_t *particle = NewParticle();
@ -337,7 +337,7 @@ void P_SpawnParticle(const DVector3 &pos, const DVector3 &vel, const DVector3 &a
particle->ttl = lifetime; particle->ttl = lifetime;
particle->bright = !!(flags & PS_FULLBRIGHT); particle->bright = !!(flags & PS_FULLBRIGHT);
particle->size = size; particle->size = size;
particle->sizestep = (lifetime == 0) ? 0 : ((endsize - size) / lifetime); particle->sizestep = sizestep;
particle->notimefreeze = !!(flags & PS_NOTIMEFREEZE); particle->notimefreeze = !!(flags & PS_NOTIMEFREEZE);
} }
} }

View file

@ -85,7 +85,7 @@ particle_t *JitterParticle (int ttl);
particle_t *JitterParticle (int ttl, double drift); particle_t *JitterParticle (int ttl, double drift);
void P_ThinkParticles (void); void P_ThinkParticles (void);
void P_SpawnParticle(const DVector3 &pos, const DVector3 &vel, const DVector3 &accel, PalEntry color, double startalpha, int lifetime, double size, double fadestep, double endsize, int flags = 0); void P_SpawnParticle(const DVector3 &pos, const DVector3 &vel, const DVector3 &accel, PalEntry color, double startalpha, int lifetime, double size, double fadestep, double sizestep, int flags = 0);
void P_InitEffects (void); void P_InitEffects (void);
void P_RunEffects (void); void P_RunEffects (void);

View file

@ -3199,7 +3199,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnParticle)
PARAM_FLOAT_OPT (accelz) { accelz = 0; } PARAM_FLOAT_OPT (accelz) { accelz = 0; }
PARAM_FLOAT_OPT (startalpha) { startalpha = 1.; } PARAM_FLOAT_OPT (startalpha) { startalpha = 1.; }
PARAM_FLOAT_OPT (fadestep) { fadestep = -1.; } PARAM_FLOAT_OPT (fadestep) { fadestep = -1.; }
PARAM_FLOAT_OPT (endsize) { endsize = -1.; } PARAM_FLOAT_OPT (sizestep) { sizestep = 0.; }
startalpha = clamp(startalpha, 0., 1.); startalpha = clamp(startalpha, 0., 1.);
if (fadestep > 0) fadestep = clamp(fadestep, 0., 1.); if (fadestep > 0) fadestep = clamp(fadestep, 0., 1.);
@ -3230,7 +3230,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnParticle)
acc.X = accelx * c + accely * s; acc.X = accelx * c + accely * s;
acc.Y = accelx * s - accely * c; acc.Y = accelx * s - accely * c;
} }
P_SpawnParticle(self->Vec3Offset(pos), vel, acc, color, startalpha, lifetime, size, fadestep, endsize, flags); P_SpawnParticle(self->Vec3Offset(pos), vel, acc, color, startalpha, lifetime, size, fadestep, sizestep, flags);
} }
return 0; return 0;
} }

View file

@ -215,7 +215,7 @@ ACTOR Actor native //: Thinker
native void A_SetScale(float scalex, float scaley = 0, int ptr = AAPTR_DEFAULT, bool usezero = false); native void A_SetScale(float scalex, float scaley = 0, int ptr = AAPTR_DEFAULT, bool usezero = false);
native void A_SetMass(int mass); native void A_SetMass(int mass);
native void A_SpawnDebris(class<Actor> spawntype, bool transfer_translation = false, float mult_h = 1, float mult_v = 1); native void A_SpawnDebris(class<Actor> spawntype, bool transfer_translation = false, float mult_h = 1, float mult_v = 1);
native void A_SpawnParticle(color color1, int flags = 0, int lifetime = 35, float size = 1, float angle = 0, float xoff = 0, float yoff = 0, float zoff = 0, float velx = 0, float vely = 0, float velz = 0, float accelx = 0, float accely = 0, float accelz = 0, float startalphaf = 1, float fadestepf = -1, float endsize = -1); native void A_SpawnParticle(color color1, int flags = 0, int lifetime = 35, float size = 1, float angle = 0, float xoff = 0, float yoff = 0, float zoff = 0, float velx = 0, float vely = 0, float velz = 0, float accelx = 0, float accely = 0, float accelz = 0, float startalphaf = 1, float fadestepf = -1, float sizestep = 0);
native state A_CheckSight(state label); native state A_CheckSight(state label);
native void A_ExtChase(bool usemelee, bool usemissile, bool playactive = true, bool nightmarefast = false); native void A_ExtChase(bool usemelee, bool usemissile, bool playactive = true, bool nightmarefast = false);
native void A_DropInventory(class<Inventory> itemtype); native void A_DropInventory(class<Inventory> itemtype);