private void TickPlayback() { if (_frames.Count == 0 || _pause <= 3) { return; } if (_playbackIndex >= _frames.Count) { _playbackIndex = 0; _pause = 0; return; } CurrentFrame = _frames[_playbackIndex]; _playbackIndex++; }
private void TickRecord() { var frame = new ReplayFrame() { Position = Entity.Position, Angles = Entity.WorldAng, Velocity = Entity.Velocity }; var cl = Client.All.FirstOrDefault(x => x.Pawn == Entity); if (cl is StrafePlayer player) { frame.Buttons = GetButtons(cl); frame.JustJumped = (player.Controller as StrafeWalkController).JustJumped; frame.Grounded = player.Controller.GroundEntity != null; } _frames.Add(frame); }