Fix ownership after snapshotReveive

This commit is contained in:
Marcel Schwarz 2020-06-01 19:12:47 +02:00
parent 64d2c04fcb
commit dab98b9256

View File

@ -136,6 +136,7 @@ class EntityManager {
getOwnerBySnapBase = GameCenterManager.sharedInstance.getGKPlayerByUsername(displayName: snapBase.ownership!)
} else {
entity.removeComponent(ofType: TeamComponent.self)
base.ownershipPlayer = nil
}
if getOwnerBySnapBase != nil {
if getOwnerBySnapBase == GKLocalPlayer.local {