Пример #1
0
 public override void UpdateOnce(Model model, double dt)
 {
     base.UpdateOnce(model, dt);
     nextBroadcast -= dt;
     if (nextBroadcast < 0) {
         nextBroadcast = Server.LAG;
         foreach (var e in Entities) {
             var msg = new Messages.WeaponUpdate(e);
             if (model.Server != null)
                 model.Server.AddToBroadcast(msg);
             if (model.Client != null)
                 model.Client.AddToSend(msg);
         }
     }
 }
Пример #2
0
 public override void UpdateOnce(Model model, double dt)
 {
     base.UpdateOnce(model, dt);
     nextBroadcast -= dt;
     if (nextBroadcast < 0)
     {
         nextBroadcast = Server.LAG;
         foreach (var e in Entities)
         {
             var msg = new Messages.WeaponUpdate(e);
             if (model.Server != null)
             {
                 model.Server.AddToBroadcast(msg);
             }
             if (model.Client != null)
             {
                 model.Client.AddToSend(msg);
             }
         }
     }
 }