Remove Modal when round ends, to prevent sending already dead units

This commit is contained in:
Marcel Schwarz 2020-06-18 00:19:30 +02:00
parent afad3e808e
commit 42446a7d49

View File

@ -50,6 +50,7 @@ class RoundTimer: Timer {
EntityManager.gameEMInstance.updateTime(time: (timeLeft > 0 ? String(timeLeft) : roundEnded))
if timeLeft == 0 {
EntityManager.gameEMInstance.removeModal()
RoundCalculatorService.sharedInstance.resetNumberOfAttacksAndFormats()
if !MultiplayerNetwork.sharedInstance.isSending {
MultiplayerNetwork.sharedInstance.sendPlayerMoves(localRoundData: DataService.sharedInstance.localRoundData)