Class BoatTopRetry

java.lang.Object
ac.boar.anticheat.prediction.BoatTopRetry

public final class BoatTopRetry extends Object
Retry for a boat exit. The client's player lands on the boat it just left and ours does not, or the other way round, or both stand on it at different heights. Why: after the ride ends the client shows the boat with its interpolator, so where the boat top is depends on the client's clock. Model: the boat top may be anywhere in the set the client can show at the start of the tick (FollowerEnvelope.renderSet, built only from times Boar saw). We run the tick again with that boat's collision moved. The run is kept only if it ends at the claimed position and velocity (normal acceptance) with the claimed vertical collision. Otherwise, nothing changes. The set converges to a point once the boat rests, so no time window is needed. - The client claims a vertical collision and its feet are inside the set: try the top at the claimed feet. This also covers both players standing on the boat at different heights. - We had a vertical collision and the client claims none: try the lowest top in the set. In-game testing showed corrections on deep water exits without this retry. With it, the retries were kept. Not covered: a boat this player did not drive, a knockback tick, a boat whose envelope is not trusted yet (no ACK answered), and a boat whose follower history did not tick this tick or whose clock is not trusted (FollowerHistory.untrustedClockReason; CompensatedWorldImpl.trustedBoatCollisionBox then gives no box).