Stop back-dating flicks, and give the half-volley rescue the right deadline
Oliver's v367 log: every 62-64 ms flick landed 76-92 ms early and a 97 ms one whiffed — v366's touch-down timing for flicks was wrong; a flick is timed by its swipe (flickLead now 0, the age is still logged). The early-swing half-volley rescue checked the bounce against the long volley window and then expired on the bounce frame; it now uses the shorter groundstroke window. The log also records where he stood when the opponent struck and where the auto-run was taking him on a miss. v368. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dfdb699f9d
commit
fe090f2fba
5 files changed
+37
-11
No files matched your search
+11
-4
@@ -378,7 +378,7 @@ function doHit(ch, quality, aim) {
|
||||
const kind = soft === null ? (aim && aim.az < 0 ? 'deep' : 'drive') + (ball.spin > 1 ? ' topspin' : ball.spin < 1 ? ' slice' : '')
|
||||
: soft === 0 ? 'drop' : soft >= 1 ? 'lob' : 'moonball';
|
||||
logSwing({ result: 'THEM', reason: `${kind} q=${r2(quality)} · ${Math.round(Math.hypot(ball.vx, ball.vz))}m/s${mark}`
|
||||
+ (ball.approach === ch.side ? ' · coming in' : '') });
|
||||
+ (ball.approach === ch.side ? ' · coming in' : ''), px: r2(P.x), pz: r2(P.z) }); // where HE stood when it left
|
||||
}
|
||||
G.wasServe = false; // a serve volleyed back pre-bounce must not fault-check the return
|
||||
ball.pow = quality; // carried pace: zombies splatter only above zSplatQ
|
||||
@@ -1618,7 +1618,8 @@ function logWhiff() {
|
||||
else reason = 'unclassified — in reach, in window, in height band'; // should not happen
|
||||
}
|
||||
logSwing({ result: 'MISS', reason: reason + ` · ${P.flick ? 'flick' : 'tap'} ${P.tap || 0}ms`, dMin: r2(best.d), y: r2(best.y), tSwing: r2(best.t),
|
||||
ballZ: r2(best.bz), bounces: best.bounces, px: r2(P.x), pz: r2(P.z) });
|
||||
ballZ: r2(best.bz), bounces: best.bounces, px: r2(P.x), pz: r2(P.z),
|
||||
...(P.tgt ? { runTo: r2(P.tgt.x) + ',' + r2(P.tgt.z) } : {}) }); // where the auto-run was taking him
|
||||
}
|
||||
|
||||
function trySwing(ch, isAI, qCap = TUNE.aiQualityMax) {
|
||||
@@ -1647,9 +1648,12 @@ function trySwing(ch, isAI, qCap = TUNE.aiQualityMax) {
|
||||
// the bounce will still land inside this window. If it will not, this is the last chance and the
|
||||
// low ball is dug out as a half-volley (the below-the-tape cap prices it): a swing a touch early
|
||||
// used to WHIFF here, which read as the game eating a good swing (Oliver's log, 2026-10-14).
|
||||
// The deadline is the window AFTER the bounce (the groundstroke one, shorter than the volley window
|
||||
// this swing is running on now) — judged against the long one, it waited and then expired on the
|
||||
// bounce frame (his v367 log, 8.98 s).
|
||||
if (letBounce()) {
|
||||
const gg = ball.g || TUNE.gravity, tb = (ball.vy + Math.sqrt(ball.vy * ball.vy + 2 * gg * ball.y)) / gg;
|
||||
if (t + tb < TUNE.swingWindup + win) return;
|
||||
if (t + tb < TUNE.swingWindup + TUNE.swingWindow * winLevel() - 0.03) return;
|
||||
}
|
||||
// quality: how centered in the window the contact lands
|
||||
const center = TUNE.swingWindup + win / 2;
|
||||
@@ -2027,7 +2031,10 @@ export function keyPressed(code, lead = 0, flick = false) {
|
||||
// gutem Timing nicht mehr bekommen"). input.js hands the touch's age in as `lead`, and the swing
|
||||
// clock starts that far along: the timing is judged from touch-down, the ball still has to be
|
||||
// there for the contact.
|
||||
P.swingT = rallyFeel() ? lead : 0; P.pose = 'swing'; P.poseT = 0; G.swung = true;
|
||||
// A FLICK is NOT back-dated by default (TUNE.flickLead 0): his v367 log showed every 62-64 ms flick
|
||||
// landing 76-92 ms EARLY once v366 timed flicks from touch-down — a flick is timed by its swipe,
|
||||
// not by the finger landing. The touch's age is still logged for both gestures.
|
||||
P.swingT = rallyFeel() ? (flick ? Math.min(lead, TUNE.flickLead) : lead) : 0; P.pose = 'swing'; P.poseT = 0; G.swung = true;
|
||||
P.tap = Math.round(lead * 1000); P.flick = flick; // ...and the log says which gesture, and how long it took to fire
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user