public void UpdateBeforeSimulation() { ProfilerShort.Begin("Thrusters"); MyEntityThrustComponent thrustComp; if (CubeGrid.Components.TryGet(out thrustComp)) { thrustComp.UpdateBeforeSimulation(false, Sync.IsServer || CubeGrid.GridSystems.ControlSystem.IsLocallyControlled); } ProfilerShort.End(); // Only update gyros if there are gyros in the system if (GyroSystem.GyroCount > 0) { ProfilerShort.Begin("Gyros"); GyroSystem.UpdateBeforeSimulation(); ProfilerShort.End(); } if (MyFakes.ENABLE_WHEEL_CONTROLS_IN_COCKPIT) { ProfilerShort.Begin("Wheels"); WheelSystem.UpdateBeforeSimulation(); ProfilerShort.End(); } /*ProfilerShort.Begin("Conveyors"); * ConveyorSystem.UpdateBeforeSimulation(); * ProfilerShort.End();*/ ProfilerShort.Begin("Control"); ControlSystem.UpdateBeforeSimulation(); ProfilerShort.End(); ProfilerShort.Begin("Cameras"); CameraSystem.UpdateBeforeSimulation(); ProfilerShort.End(); if (MySession.Static.Settings.EnableOxygen && MySession.Static.Settings.EnableOxygenPressurization) { ProfilerShort.Begin("Oxygen"); GasSystem.UpdateBeforeSimulation(); ProfilerShort.End(); } if (MyPerGameSettings.EnableJumpDrive) { ProfilerShort.Begin("Jump"); JumpSystem.UpdateBeforeSimulation(); ProfilerShort.End(); } ProfilerShort.Begin("Ship sounds"); if (ShipSoundComponent != null) { ShipSoundComponent.Update(); } ProfilerShort.End(); }
public virtual void UpdateBeforeSimulation() { ProfilerShort.Begin("Thrusters and Gyro"); MyEntityThrustComponent thrustComp; if (CubeGrid.Components.TryGet(out thrustComp)) { thrustComp.UpdateBeforeSimulation(); } GyroSystem.UpdateBeforeSimulation(); ProfilerShort.End(); if (MyFakes.ENABLE_WHEEL_CONTROLS_IN_COCKPIT) { ProfilerShort.Begin("Wheels"); WheelSystem.UpdateBeforeSimulation(); ProfilerShort.End(); } ProfilerShort.Begin("Conveyors"); ConveyorSystem.UpdateBeforeSimulation(); ProfilerShort.End(); ProfilerShort.Begin("Control"); ControlSystem.UpdateBeforeSimulation(); ProfilerShort.End(); ProfilerShort.Begin("Cameras"); CameraSystem.UpdateBeforeSimulation(); ProfilerShort.End(); if (MySession.Static.Settings.EnableOxygen) { ProfilerShort.Begin("Oxygen"); GasSystem.UpdateBeforeSimulation(); ProfilerShort.End(); } if (MyPerGameSettings.EnableJumpDrive) { ProfilerShort.Begin("Jump"); JumpSystem.UpdateBeforeSimulation(); ProfilerShort.End(); } }