Skip to content

Commit

Permalink
fix: fixing StopAuthority not being called in host mode on destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Frowen committed Apr 11, 2022
1 parent 8b34828 commit f331875
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/Mirage/Runtime/ServerObjectManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,10 @@ void DestroyObject(NetworkIdentity identity, bool destroyServerObject)
identity.ClearObservers();
if (Server.LocalClientActive)
{
// see ClientObjectManager.UnSpawn for comments
if (identity.HasAuthority)
identity.CallStopAuthority();

identity.StopClient();
}

Expand Down

0 comments on commit f331875

Please sign in to comment.