mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkServer: move UpdateServerObjects into Update
This commit is contained in:
parent
2048addde4
commit
fa64fa077f
@ -305,8 +305,13 @@ public static void DisconnectAllConnections()
|
|||||||
connections.Clear();
|
connections.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UpdateServerObjects()
|
// The user should never need to pump the update loop manually
|
||||||
|
internal static void Update()
|
||||||
{
|
{
|
||||||
|
if (!active)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// update all server objects
|
||||||
foreach (KeyValuePair<uint, NetworkIdentity> kvp in NetworkIdentity.spawned)
|
foreach (KeyValuePair<uint, NetworkIdentity> kvp in NetworkIdentity.spawned)
|
||||||
{
|
{
|
||||||
if (kvp.Value != null && kvp.Value.gameObject != null)
|
if (kvp.Value != null && kvp.Value.gameObject != null)
|
||||||
@ -322,15 +327,6 @@ static void UpdateServerObjects()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The user should never need to pump the update loop manually
|
|
||||||
internal static void Update()
|
|
||||||
{
|
|
||||||
if (active)
|
|
||||||
{
|
|
||||||
UpdateServerObjects();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnConnected(int connectionId)
|
static void OnConnected(int connectionId)
|
||||||
{
|
{
|
||||||
if (LogFilter.Debug) Debug.Log("Server accepted client:" + connectionId);
|
if (LogFilter.Debug) Debug.Log("Server accepted client:" + connectionId);
|
||||||
|
Loading…
Reference in New Issue
Block a user