minor cleanup and player count
This commit is contained in:
parent
5bc2414600
commit
a08bbdcb3d
5 changed files with 64 additions and 66 deletions
|
|
@ -119,7 +119,7 @@ namespace LightReflectiveMirror
|
|||
serverId = GetRandomServerID(),
|
||||
hostIP = hostIP,
|
||||
hostLocalIP = hostLocalIP,
|
||||
supportsDirectConnect = hostIP == null ? false : useDirectConnect,
|
||||
supportsDirectConnect = hostIP != null && useDirectConnect,
|
||||
port = port,
|
||||
useNATPunch = useNatPunch
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ namespace LightReflectiveMirror
|
|||
public string serverData;
|
||||
public bool isPublic;
|
||||
public int maxPlayers;
|
||||
public int currentPlayers { get => clients.Count + 1; } // player count
|
||||
|
||||
[JsonIgnore]
|
||||
public List<int> clients;
|
||||
|
||||
public RelayAddress relayInfo;
|
||||
|
|
|
|||
|
|
@ -195,64 +195,6 @@ Transform:
|
|||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 45, y: 180, z: 0}
|
||||
--- !u!1 &126344731
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 126344733}
|
||||
- component: {fileID: 126344732}
|
||||
m_Layer: 0
|
||||
m_Name: LRM - Connector
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &126344732
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 126344731}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0110f245bfcfc7d459681f7bd9ebc590, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
port: 7778
|
||||
maxMessageSize: 16384
|
||||
handshakeMaxSize: 3000
|
||||
noDelay: 1
|
||||
sendTimeout: 5000
|
||||
receiveTimeout: 20000
|
||||
serverMaxMessagesPerTick: 10000
|
||||
clientMaxMessagesPerTick: 1000
|
||||
batchSend: 1
|
||||
waitBeforeSend: 0
|
||||
clientUseWss: 0
|
||||
sslEnabled: 0
|
||||
sslCertJson: ./cert.json
|
||||
sslProtocols: 3072
|
||||
_logLevels: 0
|
||||
--- !u!4 &126344733
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 126344731}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1282001518}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &171810013
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -1217,7 +1159,7 @@ Transform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1226094909}
|
||||
- {fileID: 126344733}
|
||||
- {fileID: 1521806212}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
@ -1295,7 +1237,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 7064b1b1d0671194baf55fa8d5f564d6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
clientToServerTransport: {fileID: 126344732}
|
||||
clientToServerTransport: {fileID: 1521806211}
|
||||
serverIP: 127.0.0.1
|
||||
serverPort: 7777
|
||||
endpointServerPort: 8080
|
||||
|
|
@ -1406,6 +1348,59 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 41f84591ce72545258ea98cb7518d8b9, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1521806210
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1521806212}
|
||||
- component: {fileID: 1521806211}
|
||||
m_Layer: 0
|
||||
m_Name: LRM - Connector
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1521806211
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1521806210}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6b0fecffa3f624585964b0d0eb21b18e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Port: 7777
|
||||
NoDelay: 1
|
||||
Interval: 10
|
||||
FastResend: 2
|
||||
CongestionWindow: 0
|
||||
SendWindowSize: 4096
|
||||
ReceiveWindowSize: 4096
|
||||
debugLog: 0
|
||||
statisticsGUI: 0
|
||||
statisticsLog: 0
|
||||
--- !u!4 &1521806212
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1521806210}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1282001518}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1600541100
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -288,9 +288,8 @@ namespace LightReflectiveMirror
|
|||
}
|
||||
}
|
||||
|
||||
IPAddress serverAddr;
|
||||
|
||||
if (!IPAddress.TryParse(serverIP, out serverAddr))
|
||||
if (!IPAddress.TryParse(serverIP, out IPAddress serverAddr))
|
||||
serverAddr = Dns.GetHostEntry(serverIP).AddressList[0];
|
||||
|
||||
_relayPuncherIP = new IPEndPoint(serverAddr, NATPunchtroughPort);
|
||||
|
|
@ -437,13 +436,13 @@ namespace LightReflectiveMirror
|
|||
public string serverData;
|
||||
public int hostId;
|
||||
public List<int> clients;
|
||||
|
||||
public int currentPlayers;
|
||||
public RelayAddress relayInfo;
|
||||
|
||||
/// <summary>
|
||||
/// This variable is only available on the client
|
||||
/// </summary>
|
||||
public int currentPlayers { get => clients.Count + 1; }
|
||||
//public int currentPlayers { get => clients.Count + 1; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
|
|
|||
|
|
@ -516,7 +516,8 @@ PlayerSettings:
|
|||
1: MIRROR;MIRROR_17_0_OR_NEWER;MIRROR_18_0_OR_NEWER;MIRROR_24_0_OR_NEWER;MIRROR_26_0_OR_NEWER;MIRROR_27_0_OR_NEWER;MIRROR_28_0_OR_NEWER;MIRROR_29_0_OR_NEWER;MIRROR_30_0_OR_NEWER;MIRROR_30_5_2_OR_NEWER;MIRROR_32_1_2_OR_NEWER;MIRROR_32_1_4_OR_NEWER;MIRROR_35_0_OR_NEWER;MIRROR_35_1_OR_NEWER
|
||||
13: MIRROR;MIRROR_17_0_OR_NEWER;MIRROR_18_0_OR_NEWER;MIRROR_24_0_OR_NEWER;MIRROR_26_0_OR_NEWER;MIRROR_27_0_OR_NEWER;MIRROR_28_0_OR_NEWER;MIRROR_29_0_OR_NEWER;MIRROR_30_0_OR_NEWER;MIRROR_30_5_2_OR_NEWER;MIRROR_32_1_2_OR_NEWER;MIRROR_32_1_4_OR_NEWER;MIRROR_35_0_OR_NEWER;MIRROR_35_1_OR_NEWER
|
||||
platformArchitecture: {}
|
||||
scriptingBackend: {}
|
||||
scriptingBackend:
|
||||
Standalone: 1
|
||||
il2cppCompilerConfiguration: {}
|
||||
managedStrippingLevel: {}
|
||||
incrementalIl2cppBuild: {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue