aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


commit bd8cbb2a49074d8b12cb7e6d9737b51eb4d5d7aa
parent 619e79516921acb2025d19cbdafe217d8b9e02e0
Author: anon <anon@example.com>
Date:   Sat, 17 Oct 2026 01:20:24 +0000

Validate browser archive loading and settle sweep input after arrival

Diffstat:
Mdocs/playfield-validation.md | 6++++--
Mtools/client/sweep_capture.c | 4++--
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/docs/playfield-validation.md b/docs/playfield-validation.md @@ -51,8 +51,10 @@ client's `CharacterReady` packet followed by at least ten seconds and 30 rendere frames. Socket registration alone is insufficient: it precedes scene loading. The isolated server log supplies this packet evidence; `character_ready: true` records that the stricter check was used. -New arrivals also replay a 0.6-second left-arrow hold, followed by a one-second -forward (`W`) hold, through the client's normal SDL keyboard event handler. +New arrivals wait one second after readiness, then replay a 0.6-second left-arrow +hold followed by a one-second forward (`W`) hold through the client's normal SDL +keyboard event handler. The delay gives the client time to finish arrival +handling before the first key press. The result records delivery times and live server position/rotation before and after the sequence. `movement_observed` requires horizontal displacement; `rotation_observed` compares orientation while treating opposite quaternion diff --git a/tools/client/sweep_capture.c b/tools/client/sweep_capture.c @@ -18,13 +18,13 @@ int SDL_PollEvent(SDL_Event *event) static int (*poll_event)(SDL_Event *); if (!poll_event) poll_event = dlsym(RTLD_NEXT, "SDL_PollEvent"); if (!event || input_next == 4) return poll_event(event); - const double times[] = {0, .6, .8, 1.8}; + const double times[] = {1, 1.6, 1.8, 2.8}; const SDL_Keycode keys[] = {SDLK_LEFT, SDLK_LEFT, SDLK_w, SDLK_w}; struct timespec timestamp; assert(!clock_gettime(CLOCK_MONOTONIC, &timestamp)); double elapsed = timestamp.tv_sec + timestamp.tv_nsec / 1e9 - input_started; - /* Replay through the client's normal keyboard handler after scene readiness. */ + /* Let arrival handling settle, then replay through the normal keyboard handler. */ if (elapsed >= times[input_next]) { memset(event, 0, sizeof(*event)); event->type = input_next & 1 ? SDL_KEYUP : SDL_KEYDOWN;