Пример #1
0
        public static void Init()
        {
            if (instance == null)
            {
                instance = new BvServer();
            }

            instance.messageHandler = new SecureMsgHandler(instance.NetworkMessageHandler);
            MyAPIGateway.Multiplayer.RegisterSecureMessageHandler(serverHandlerID, instance.messageHandler);
        }
Пример #2
0
 protected override void AfterLoadData()
 {
     BvApiMaster.Init();
     BvServer.Init();
 }
Пример #3
0
 /// <summary>
 /// Release resources
 /// </summary>
 public override void Close()
 {
     MyAPIGateway.Multiplayer.UnregisterSecureMessageHandler(serverHandlerID, messageHandler);
     instance = null;
 }
Пример #4
0
 /// <summary>
 /// Detaches the head.
 /// </summary>
 public void DetachHead()
 {
     //subtype.Detach(); -- Bug: This isn't being synchronized with the DS, yet Attach() is.
     BvServer.SendEntityActionToServer(ServerBlockActions.MyMechanicalConnection | ServerBlockActions.DetachHead, subtype.EntityId);
 }
Пример #5
0
 /// <summary>
 /// Attempts to attach a nearby head.
 /// </summary>
 public void AttachHead()
 {
     //subtype.Attach();
     BvServer.SendEntityActionToServer(ServerBlockActions.MyMechanicalConnection | ServerBlockActions.AttachHead, subtype.EntityId);
 }