From 5df7fd3dac3dd18225dbf556448c8898f81b6d8e Mon Sep 17 00:00:00 2001 From: Aldin Duraki Date: Wed, 20 May 2020 23:46:40 +0200 Subject: [PATCH] TEST: playermoves not synched in same second --- GoldWars/GoldWars/Components/TimerComponent.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GoldWars/GoldWars/Components/TimerComponent.swift b/GoldWars/GoldWars/Components/TimerComponent.swift index 52c51b6..c91785c 100644 --- a/GoldWars/GoldWars/Components/TimerComponent.swift +++ b/GoldWars/GoldWars/Components/TimerComponent.swift @@ -31,7 +31,7 @@ class TimerComponent: GKComponent { func timeLeft() -> Int { let remainingSeconds = Int(endTime.timeIntervalSince(Date())) - if(remainingSeconds < 0 ){ + if(remainingSeconds < 0 && DataService.sharedInstance.didReceiveAllData()){ startWithDuration(duration: duration) } return remainingSeconds