The trail reads as motion, never as residue: the ghosts fade with the sprint

The lingering doubles were a real bug, not a taste problem: racketAI's
!incoming return kept the last chase's vx/vz on the body, so the speed
ghosts trailed a zombie that had already stopped. The velocity dies with
the chase now (tested). The look is halved with it: ghost alphas
0.22/0.10 -> 0.11/0.05, trailK 0.05 -> 0.035 — a hint of speed in the
corner of the eye, never a second body.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
wuwiandClaude Fable 5 committed 2026-08-28 16:36:19 +02:00
1 parent 4ea9af5442
commit 98b01fea5a
6 files changed
+22 -5

No files matched your search

+4 -2
View File
@@ -814,7 +814,9 @@ function drawZombie(zb, ghost) {
// during a named frame — a collapsing corpse must not smear on stale velocity.
if (!ghost && TUNE.trailMin && !zb.showFrame
&& Math.hypot(zb.vx || 0, zb.vz || 0) > TUNE.trailMin) {
for (const [k, a] of [[2, 0.10], [1, 0.22]]) {
// alphas halved from 0.10/0.22 on the first phone verdict ("dezenter"): a hint of speed in
// the corner of the eye, never a second body
for (const [k, a] of [[2, 0.05], [1, 0.11]]) {
ctx.save(); ctx.globalAlpha *= a;
drawZombie({ ...zb, x: zb.x - zb.vx * TUNE.trailK * k, z: zb.z - (zb.vz || 0) * TUNE.trailK * k }, true);
ctx.restore();
@@ -1801,7 +1803,7 @@ function drawChar(ch, ghost) {
// MOVEMENT READS: the same two-ghost speed streak the bodies wear (see drawZombie) — gameplay's
// mover writes P.vx/vz, so only a genuine sprint (auto-run chase, horde steer) ever draws one.
if (!ghost && TUNE.trailMin && Math.hypot(ch.vx || 0, ch.vz || 0) > TUNE.trailMin) {
for (const [k, a] of [[2, 0.10], [1, 0.22]]) {
for (const [k, a] of [[2, 0.05], [1, 0.11]]) { // halved with drawZombie's — one look, both bodies
ctx.save(); ctx.globalAlpha *= a;
drawChar({ ...ch, x: ch.x - ch.vx * TUNE.trailK * k, z: ch.z - ch.vz * TUNE.trailK * k }, true);
ctx.restore();