Fix wrong argument order for calculating distance

FossilOrigin-Name: 75095b4f6e2b5ed05c3279c84b6862521cf2103ea8c61e13fe09ee6e81723302
This commit is contained in:
Jonathan Schleifer 2025-03-23 22:14:48 +00:00
parent 2f8d255946
commit 45f4039f3b
7 changed files with 20 additions and 21 deletions

View file

@ -150,8 +150,8 @@ particle_splash(int type, int num, int fade, OFVector3D p)
void
particle_trail(int type, int fade, OFVector3D s, OFVector3D e)
{
float d = OFDistanceOfVectors3D(s, e);
OFVector3D v = OFSubtractVectors3D(s, e);
float d = OFDistanceOfVectors3D(e, s);
OFVector3D v = OFSubtractVectors3D(e, s);
v = OFMultiplyVector3D(v, 1.0f / (d * 2 + 0.1f));
for (int i = 0; i < ((int)d * 2); i++) {
s = OFAddVectors3D(s, v);