148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
newparticle(p, &d, rnd(fade * 3), type);
}
}
void
particle_trail(int type, int fade, const OFVector3D *s, const OFVector3D *e)
{
vdist(d, v, *s, *e);
v = OFMultiplyVector3D(v, 1.0f / (d * 2 + 0.1f));
OFVector3D p = *s;
for (int i = 0; i < ((int)d * 2); i++) {
p = OFAddVectors3D(p, v);
OFVector3D d =
OFMakeVector3D(rnd(11) - 5, rnd(11) - 5, rnd(11) - 5);
newparticle(&p, &d, rnd(fade) + fade, type);
|
|
>
|
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
newparticle(p, &d, rnd(fade * 3), type);
}
}
void
particle_trail(int type, int fade, const OFVector3D *s, const OFVector3D *e)
{
float d = OFDistanceOfVectors3D(*s, *e);
OFVector3D v = OFSubtractVectors3D(*s, *e);
v = OFMultiplyVector3D(v, 1.0f / (d * 2 + 0.1f));
OFVector3D p = *s;
for (int i = 0; i < ((int)d * 2); i++) {
p = OFAddVectors3D(p, v);
OFVector3D d =
OFMakeVector3D(rnd(11) - 5, rnd(11) - 5, rnd(11) - 5);
newparticle(&p, &d, rnd(fade) + fade, type);
|