have to keep the old behavior
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1741 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
996757ec23
commit
083ca12678
1 changed files with 12 additions and 5 deletions
|
@ -539,7 +539,14 @@ void P_ParticleEffect_f(void)
|
||||||
else if (!strcmp(var, "scaledelta"))
|
else if (!strcmp(var, "scaledelta"))
|
||||||
ptype->scaledelta = atof(value);
|
ptype->scaledelta = atof(value);
|
||||||
|
|
||||||
else if (!strcmp(var, "count") || !strcmp(var, "step"))
|
|
||||||
|
else if (!strcmp(var, "step"))
|
||||||
|
{
|
||||||
|
ptype->count = 1/atof(value);
|
||||||
|
if (Cmd_Argc()>2)
|
||||||
|
ptype->countrand = 1/atof(Cmd_Argv(2));
|
||||||
|
}
|
||||||
|
else if (!strcmp(var, "count"))
|
||||||
{
|
{
|
||||||
ptype->count = atof(value);
|
ptype->count = atof(value);
|
||||||
if (Cmd_Argc()>2)
|
if (Cmd_Argc()>2)
|
||||||
|
@ -2769,7 +2776,7 @@ static void P_ParticleTrailDraw (vec3_t startpos, vec3_t end, part_type_t *ptype
|
||||||
ts = NULL;
|
ts = NULL;
|
||||||
|
|
||||||
// use ptype step to calc step vector and step size
|
// use ptype step to calc step vector and step size
|
||||||
step = ptype->count;
|
step = 1/ptype->count;
|
||||||
|
|
||||||
if (step < 0.01)
|
if (step < 0.01)
|
||||||
step = 0.01;
|
step = 0.01;
|
||||||
|
@ -2877,9 +2884,9 @@ static void P_ParticleTrailDraw (vec3_t startpos, vec3_t end, part_type_t *ptype
|
||||||
|
|
||||||
// if (ptype->spawnmode == SM_TRACER)
|
// if (ptype->spawnmode == SM_TRACER)
|
||||||
if (ptype->spawnparam1)
|
if (ptype->spawnparam1)
|
||||||
tcount = (int)(len / ptype->count / ptype->spawnparam1);
|
tcount = (int)(len * ptype->count / ptype->spawnparam1);
|
||||||
else
|
else
|
||||||
tcount = (int)(len / ptype->count);
|
tcount = (int)(len * ptype->count);
|
||||||
|
|
||||||
if (ptype->colorindex >= 0)
|
if (ptype->colorindex >= 0)
|
||||||
{
|
{
|
||||||
|
@ -3042,7 +3049,7 @@ static void P_ParticleTrailDraw (vec3_t startpos, vec3_t end, part_type_t *ptype
|
||||||
|
|
||||||
if (ptype->countrand)
|
if (ptype->countrand)
|
||||||
{
|
{
|
||||||
float rstep = ptype->countrand * frandom();
|
float rstep = frandom() / ptype->countrand;
|
||||||
VectorMA(start, rstep, vec, start);
|
VectorMA(start, rstep, vec, start);
|
||||||
step += rstep;
|
step += rstep;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue