Example #1
0
        void pDynamicObject(NetworkClient nc, DynamicBase u)
        {
            if (!isLoggedIn(nc))
                throw new Exception("Not logged in.");

            var ids = OctTree.GetTree(u.Orientation.Position.ChunkPosition).WhoKnows();
            foreach (var node in clientList.AsEnumerable)
                if (node.Key != nc && ids.Contains(node.Value.ID))
                {
                    node.Key.Send(u);
                    Console.WriteLine("sent to " + node.Value.Username);
                }
        }
 public override void UpdateDynamicObject(DynamicBase db)
 {
     DynamicManager.Change(db);
     nc.Send(db);
 }
Example #3
0
 public abstract void UpdateDynamicObject(DynamicBase db);
 void DynamicChange(DynamicBase packet)
 {
     DynamicManager.Change(packet);
 }
Example #5
0
 public static void Change(DynamicBase db)
 {
     db.Old = false;
     objects[db.ID] = db;
 }