mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
syntax
This commit is contained in:
parent
1b562c7b6a
commit
61295a5120
@ -504,7 +504,7 @@ internal static void OnTransportData(int connectionId, ArraySegment<byte> data,
|
||||
// the next time.
|
||||
// => consider moving processing to NetworkEarlyUpdate.
|
||||
while (!isLoadingScene &&
|
||||
connection.unbatcher.GetNextMessage(out NetworkReader reader, out double remoteTimestamp))
|
||||
connection.unbatcher.GetNextMessage(out NetworkReader reader, out double remoteTimestamp))
|
||||
{
|
||||
// enough to read at least header size?
|
||||
if (reader.Remaining >= NetworkMessages.IdSize)
|
||||
@ -900,7 +900,10 @@ internal static void ShowForConnection(NetworkIdentity identity, NetworkConnecti
|
||||
|
||||
internal static void HideForConnection(NetworkIdentity identity, NetworkConnection conn)
|
||||
{
|
||||
ObjectHideMessage msg = new ObjectHideMessage {netId = identity.netId};
|
||||
ObjectHideMessage msg = new ObjectHideMessage
|
||||
{
|
||||
netId = identity.netId
|
||||
};
|
||||
conn.Send(msg);
|
||||
}
|
||||
|
||||
@ -1321,7 +1324,10 @@ static void DestroyObject(NetworkIdentity identity, DestroyMode mode)
|
||||
identity.connectionToClient?.RemoveOwnedObject(identity);
|
||||
|
||||
// send object destroy message to all observers, clear observers
|
||||
SendToObservers(identity, new ObjectDestroyMessage {netId = identity.netId});
|
||||
SendToObservers(identity, new ObjectDestroyMessage
|
||||
{
|
||||
netId = identity.netId
|
||||
});
|
||||
identity.ClearObservers();
|
||||
|
||||
// in host mode, call OnStopClient/OnStopLocalPlayer manually
|
||||
|
@ -10,7 +10,7 @@ public override void OnServerDisconnect(NetworkConnectionToClient conn)
|
||||
base.OnServerDisconnect(conn);
|
||||
++called;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TestFixture]
|
||||
public class NetworkManagerStopHostOnServerDisconnectTest : MirrorEditModeTest
|
||||
|
Loading…
Reference in New Issue
Block a user