mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
fix: Added OnStopServer to NetworkMatchChecker
This commit is contained in:
parent
36814e6abb
commit
2f24d9aa2b
@ -83,6 +83,14 @@ public override void OnStartServer()
|
|||||||
// identity.RebuildObservers is called right after this from NetworkServer.SpawnObject
|
// identity.RebuildObservers is called right after this from NetworkServer.SpawnObject
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnStopServer()
|
||||||
|
{
|
||||||
|
if (currentMatch == Guid.Empty) return;
|
||||||
|
|
||||||
|
if (matchPlayers.ContainsKey(currentMatch) && matchPlayers[currentMatch].Remove(netIdentity))
|
||||||
|
RebuildMatchObservers(currentMatch);
|
||||||
|
}
|
||||||
|
|
||||||
void RebuildMatchObservers(Guid specificMatch)
|
void RebuildMatchObservers(Guid specificMatch)
|
||||||
{
|
{
|
||||||
foreach (NetworkIdentity networkIdentity in matchPlayers[specificMatch])
|
foreach (NetworkIdentity networkIdentity in matchPlayers[specificMatch])
|
||||||
|
Loading…
Reference in New Issue
Block a user