Moderator: GZDoom Developers
if (effects & FX_ROCKET)
{
if (++smokecounter == 4)
{
// add some smoke behind the rocket
smokecounter = 0;
AActor *th = Spawn(Level, "RocketSmokeTrail", Vec3Offset(-Vel), ALLOW_REPLACE);
if (th)
{
th->tics -= pr_rockettrail()&3;
if (th->tics < 1) th->tics = 1;
if (!(cl_rockettrails & 2)) th->renderflags |= RF_INVISIBLE;
}
}
}
else if (effects & FX_GRENADE)
{
if (++smokecounter == 8)
{
smokecounter = 0;
DAngle moveangle = Vel.Angle();
double xo = -moveangle.Cos() * radius * 2 + pr_rockettrail() / 64.;
double yo = -moveangle.Sin() * radius * 2 + pr_rockettrail() / 64.;
double zo = -Height * Vel.Z / 8. + Height * (2 / 3.);
AActor * th = Spawn(Level, "GrenadeSmokeTrail", Vec3Offset(xo, yo, zo), ALLOW_REPLACE);
if (th)
{
th->tics -= pr_rockettrail()&3;
if (th->tics < 1) th->tics = 1;
if (!(cl_rockettrails & 2)) th->renderflags |= RF_INVISIBLE;
}
}
}
Users browsing this forum: No registered users and 1 guest