From dab98b92563cf36f7c6895654cf6f4b18e1cce1c Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Mon, 1 Jun 2020 19:12:47 +0200 Subject: [PATCH] Fix ownership after snapshotReveive --- GoldWars/GoldWars/Entities/EntityManager.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/GoldWars/GoldWars/Entities/EntityManager.swift b/GoldWars/GoldWars/Entities/EntityManager.swift index 1e44273..04e02fc 100644 --- a/GoldWars/GoldWars/Entities/EntityManager.swift +++ b/GoldWars/GoldWars/Entities/EntityManager.swift @@ -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 {