Observe settled positions in the native input regression

A paused client can retain its last velocity without moving; wait for actual position stability before measuring another owner’s movement.

Co-Authored-By: OpenAI Codex <[email protected]>
This commit is contained in:
martipopsandOpenAI Codex committed 2026-11-01 14:57:24 -05:00
1 parent 09940babb5
commit d884729a0e
1 file changed
+6 -2
+6 -2
View File
@@ -950,8 +950,12 @@ def scenario_native_pointer():
other = 3 - owner
# Spectator movement decelerates after a release; measure fresh movement
# after that inertia settles, while checking held keys independently.
g.wait(lambda: all(abs(state(other)['player']['velocity'][i]) < 0.001 for i in [0, 2]),
f"P{other}'s previous movement settles", seconds=5)
def settled():
before = state(other)['player']['position']
time.sleep(0.15)
after = state(other)['player']['position']
return all(abs(after[i] - before[i]) < 0.001 for i in [0, 2])
g.wait(settled, f"P{other}'s previous movement settles", seconds=5)
before = [state(n)['player']['position'] for n in [1, 2]]
native.key('w', True)
try: