Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 static void OnSetVelocity(MySyncPistonBase sync, ref VelocityMsg msg, MyNetworkClient sender)
 {
     sync.Entity.Velocity = msg.Velocity;
 }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
 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);
     }
 }
Exemplo n.º 6
0
 public static string ToYAMLString(VelocityMsg msg)
 {
     return(msg.ToYAMLString());
 }
Exemplo n.º 7
0
 static void OnSetVelocity(MySyncPistonBase sync, ref VelocityMsg msg, MyNetworkClient sender)
 {
     sync.Entity.Velocity = msg.Velocity;
 }