Dust settles on every court: tennis ticks particles too, EPIC! cheers, the machine explains itself
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4e80bd8cb2
commit
4569981365
3 files changed
+21
-19
No files matched your search
+16
-9
@@ -897,6 +897,21 @@ function bleed(zb) {
|
||||
}
|
||||
}
|
||||
|
||||
// Split out of updateZombies because particles are NOT a zombie feature: the ball's bounce dust
|
||||
// fires in TENNIS too, and while this loop only ran in splatter, tennis dust was born, never
|
||||
// ticked, and sat on the clay forever — the "marks where the ball hit" testers saw.
|
||||
export function updateParts(dt) {
|
||||
for (let i = parts.length - 1; i >= 0; i--) {
|
||||
const p = parts[i];
|
||||
p.t -= dt;
|
||||
if (p.smoke) { p.vy = 0.55; p.vx *= 0.97; p.vz *= 0.97; } // smoke rises and spreads; it does not fall
|
||||
else p.vy -= 14 * dt;
|
||||
p.x += p.vx * dt; p.y += p.vy * dt; p.z += p.vz * dt;
|
||||
if (p.y < 0) { p.y = 0; p.vy = 0; p.vx *= 0.5; p.vz *= 0.5; }
|
||||
if (p.t <= 0) parts.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
export function updateZombies(dt) {
|
||||
moanT -= dt;
|
||||
if (moanT <= 0) { moan(); moanT = 2.5 + Math.random() * 4; }
|
||||
@@ -1295,15 +1310,7 @@ export function updateZombies(dt) {
|
||||
if (dead) extras.splice(i, 1);
|
||||
}
|
||||
|
||||
for (let i = parts.length - 1; i >= 0; i--) {
|
||||
const p = parts[i];
|
||||
p.t -= dt;
|
||||
if (p.smoke) { p.vy = 0.55; p.vx *= 0.97; p.vz *= 0.97; } // smoke rises and spreads; it does not fall
|
||||
else p.vy -= 14 * dt;
|
||||
p.x += p.vx * dt; p.y += p.vy * dt; p.z += p.vz * dt;
|
||||
if (p.y < 0) { p.y = 0; p.vy = 0; p.vx *= 0.5; p.vz *= 0.5; }
|
||||
if (p.t <= 0) parts.splice(i, 1);
|
||||
}
|
||||
updateParts(dt);
|
||||
|
||||
const boy = G.boy; // the boy mops any gore he passes over
|
||||
for (let i = gore.length - 1; i >= 0; i--) {
|
||||
|
||||
Reference in new issue
Block a user