public static void RequestThrow(MyObjectBuilder_CubeGrid grid, Vector3D position, Vector3D linearVelocity, float mass, MyStringId throwSound) { ThrowMsg msg = new ThrowMsg(); msg.Grid = grid; msg.Position = position; msg.LinearVelocity = linearVelocity; msg.Mass = mass; msg.ThrowSound = throwSound; MySession.Static.SyncLayer.SendMessageToServer(ref msg); }
static void OnThrowMessageSuccess(ref ThrowMsg msg, MyNetworkClient sender) { MySessionComponentThrower.Static.Throw(msg.Grid, msg.Position, msg.LinearVelocity, msg.Mass, msg.ThrowSound); }
static void OnThrowMessageRequest(ref ThrowMsg msg, MyNetworkClient sender) { MySession.Static.SyncLayer.SendMessageToAllAndSelf(ref msg, MyTransportMessageEnum.Success); }