static void OnSetVelocity(MySyncPistonBase sync, ref VelocityMsg msg, MyNetworkClient sender) { sync.Entity.Velocity = msg.Velocity; if (Sync.IsServer) { Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId); } }
public void SetVelocity(float v) { var msg = new VelocityMsg(); msg.EntityId = Entity.EntityId; msg.Velocity = v; OnSetVelocity(this, ref msg, Sync.Clients.LocalClient); Sync.Layer.SendMessageToAllAndSelf(ref msg); }
static void OnSetVelocity(MySyncPistonBase sync, ref VelocityMsg msg, MyNetworkClient sender) { sync.Entity.Velocity = msg.Velocity; }
public static string ToYAMLString(VelocityMsg msg) { return(msg.ToYAMLString()); }