Differences From Artifact [41bd950ef0]:
- File
src/renderparticles.m
— part of check-in
[304230c1e1]
at
2025-03-23 21:52:54
on branch trunk
— Avoid pointless pointers
Passing OFVector3D by reference is annoying and is worse at passing via registers. (user: js, size: 4036) [annotate] [blame] [check-ins using]
To Artifact [c7ff826e5c]:
- File src/renderparticles.m — part of check-in [75095b4f6e] at 2025-03-23 22:14:48 on branch trunk — Fix wrong argument order for calculating distance (user: js, size: 4036) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
146 147 148 149 150 151 152 | newparticle(p, d, rnd(fade * 3), type); } } void particle_trail(int type, int fade, OFVector3D s, OFVector3D e) { | | | | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | newparticle(p, d, rnd(fade * 3), type); } } void particle_trail(int type, int fade, OFVector3D s, OFVector3D 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); OFVector3D d = OFMakeVector3D(rnd(11) - 5, rnd(11) - 5, rnd(11) - 5); newparticle(s, d, rnd(fade) + fade, type); } |
︙ | ︙ |