private void Tick() { lock (_commandCache) { if (_commandCache.Count > 0) { _world.AddInput(_world.CurrentTick + LagCompensation, LocalPlayerId, _commandCache); if (SendCommandsToBuffer) { _remoteCommandBuffer.Insert(_world.CurrentTick + LagCompensation, LocalPlayerId, _commandCache.ToArray()); } _commandCache.Clear(); } } _world.Predict(); }