fix drawing spell preview after the end of a turn

This commit is contained in:
PeaAshMeter 2025-11-12 02:55:49 +03:00
parent de24808a82
commit cd8d2768e0
2 changed files with 5 additions and 1 deletions

View File

@ -24,6 +24,10 @@ function behavior:endCast()
end end
function behavior:update(dt) function behavior:update(dt)
if Tree.level.selector:deselected() then
self.state = "idle"
self.cast = nil
end
if self.cast and self.state == "casting" then self.cast:update(self.owner, dt) end if self.cast and self.state == "casting" then self.cast:update(self.owner, dt) end
end end

View File

@ -30,7 +30,7 @@ end
--- ---
--- Если в очереди на ход больше никого нет, заканчиваем раунд --- Если в очереди на ход больше никого нет, заканчиваем раунд
function turnOrder:next() function turnOrder:next()
Tree.level.selector.id = nil Tree.level.selector:select(nil)
self.actedQueue:insert(self.current) self.actedQueue:insert(self.current)
local next = self.pendingQueue:peek() local next = self.pendingQueue:peek()
if not next then return self:endRound() end if not next then return self:endRound() end