浏览代码

suggested changes from PR

/main
eheimburg 4 年前
当前提交
79f53a0f
共有 2 个文件被更改,包括 10 次插入3 次删除
  1. 2
      Assets/BossRoom/Scripts/Client/ClientCharacterVisualization.cs
  2. 11
      Assets/BossRoom/Scripts/Server/Game/State/ServerBossRoomState.cs

2
Assets/BossRoom/Scripts/Client/ClientCharacterVisualization.cs


/// <inheritdoc />
public override void NetworkStart()
{
if (!IsClient && !IsHost)
if (!IsClient)
{
enabled = false;
}

11
Assets/BossRoom/Scripts/Server/Game/State/ServerBossRoomState.cs


public override void NetworkStart()
{
base.NetworkStart();
if (!IsServer && !IsHost)
if (!IsServer)
{
this.enabled = false;
}

// the ServerGNHLogic's approval-callback is done, meaning that if we get this event,
// the client is officially allowed to be here.
MLAPI.NetworkingManager.Singleton.OnClientConnectedCallback += OnClientConnected;
NetworkingManager.Singleton.OnClientConnectedCallback += OnClientConnected;
// if any other players are already connected to us (i.e. they connected while we were
// in the login screen), give them player characters
foreach (var connection in NetworkingManager.Singleton.ConnectedClientsList)
{
SpawnPlayer(connection.ClientId);
}
if (IsHost)
{

正在加载...
取消
保存