private static void OnThrustTorqueReceived(MySyncGrid sync, ref ThrustAndTorqueMsg msg, MyNetworkClient sender) { sender.ClientFrameId = msg.ClientFrameId; //if (false) { sync.Entity.GridSystems.ThrustSystem.ControlThrust = msg.Thrust; sync.Entity.GridSystems.GyroSystem.ControlTorque = msg.Torque; } }
private static void OnThrustTorqueReceived(MySyncGrid sync, ref ThrustAndTorqueMsg msg, MyNetworkClient sender) { sender.ClientFrameId = msg.ClientFrameId; //if (false) { var thrustComp = sync.Entity.Components.Get<MyEntityThrustComponent>(); if (thrustComp != null) thrustComp.ControlThrust = msg.Thrust; sync.Entity.GridSystems.GyroSystem.ControlTorque = msg.Torque; } if (Sync.IsServer) { Sync.Layer.SendAsRpcToAllButOne(ref msg, sender.SteamUserId); } }