Compare commits

...
Author SHA1 Message Date
Ludovic MarieandClaude Opus 5.5 f85ccb2bd2 Main builds again: one Attack arm in the hub, anticheat first, then the queued-move break
#5123 added a second S::Attack arm after the anticheat's, so clippy -D warnings
fails on main (unreachable pattern) and its queued-move break never ran. The
break now sits in the anticheat's arm, after an attack it forwards.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-31 18:20:43 +01:00
+7 -10
View File
@@ -2703,9 +2703,15 @@ impl Hub {
g.max_unacknowledged = 10;
}
S::Pong(p) => self.anticheat_pong(i, p.id),
// handleAttack is the game's: a move queued behind it would move the
// player (or land them, losing a falling attack's critical hit) before
// the game checks their reach and state.
S::Attack(p) => {
if !self.anticheat_attack(i, p.id, events) {
events.push(HostEvent::Packet(conn, Box::new(S::Attack(p))));
if self.move_queued(i) {
break;
}
}
}
S::Punch(p) => {
@@ -2803,16 +2809,7 @@ impl Hub {
break;
}
}
// handleAttack and handleInteract are the game's too: a move queued
// behind them would move the player (or land them on the ground,
// losing a falling attack's critical hit) before the game checks
// their reach and state.
S::Attack(p) => {
events.push(HostEvent::Packet(conn, Box::new(S::Attack(p))));
if self.move_queued(i) {
break;
}
}
// handleInteract is the game's too: the same holds as for Attack above.
S::Interact(p) => {
events.push(HostEvent::Packet(conn, Box::new(S::Interact(p))));
if self.move_queued(i) {