Fix ownership after snapshotReveive
This commit is contained in:
parent
64d2c04fcb
commit
dab98b9256
@ -136,6 +136,7 @@ class EntityManager {
|
|||||||
getOwnerBySnapBase = GameCenterManager.sharedInstance.getGKPlayerByUsername(displayName: snapBase.ownership!)
|
getOwnerBySnapBase = GameCenterManager.sharedInstance.getGKPlayerByUsername(displayName: snapBase.ownership!)
|
||||||
} else {
|
} else {
|
||||||
entity.removeComponent(ofType: TeamComponent.self)
|
entity.removeComponent(ofType: TeamComponent.self)
|
||||||
|
base.ownershipPlayer = nil
|
||||||
}
|
}
|
||||||
if getOwnerBySnapBase != nil {
|
if getOwnerBySnapBase != nil {
|
||||||
if getOwnerBySnapBase == GKLocalPlayer.local {
|
if getOwnerBySnapBase == GKLocalPlayer.local {
|
||||||
|
Loading…
Reference in New Issue
Block a user