Class PredictedRushStops
The owner's memory of the rush stops its predicted hits made, by the movement tick each followed, so a replay can make them again (see EndMotionFromHit()). Pure bookkeeping, no motor.
public sealed class PredictedRushStops
- Inheritance
-
PredictedRushStops
- Inherited Members
Fields
Capacity
The most stops remembered at once; the oldest goes first.
public const int Capacity = 8
Field Value
ExpiryTicks
How long a stop waits for the server to confirm it, in ticks (two seconds at 30 Hz).
public const uint ExpiryTicks = 60
Field Value
Properties
Count
How many stops are remembered.
public int Count { get; }
Property Value
Methods
Clear()
Forgets everything.
public void Clear()
OnReconciled(uint, bool)
After a correction for reconciledTick has been applied: forgets the stops the server has confirmed
(its state shows no rush) or never made (expired), and answers whether a stop the correction has carried past must be
made now, because the server is still rushing a tick or two behind the owner's hit.
public bool OnReconciled(uint reconciledTick, bool serverRushing)
Parameters
reconciledTickuintThe tick the correction is for.
serverRushingboolWhether the corrected state is still rushing.
Returns
- bool
True to end the rush now, before the replay.
Record(uint)
Remembers a stop made after the movement step of tick.
public void Record(uint tick)
Parameters
tickuint
StopsAfter(uint)
True when a stop was made after the movement step of tick.
public bool StopsAfter(uint tick)
Parameters
tickuint