Skip to content

Commit 0b3ea80

Browse files
authored
Merge pull request #37 from Escapingbug/round-end-panel
2 parents 0612022 + c4cb65f commit 0b3ea80

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,5 @@ All other information should be explored by reading the source code!
7070
- [2023/3/29 08:46] fix: place history.scores updates to correct loc.([#32](https://github.com/Escapingbug/dotaxctf/pull/32), reporter: AAA剑圣)
7171
- [2023/3/29 11:18] feat: print with `[Sandbox.candidate_name]` banner to support checking specified hero's log.([#33](https://github.com/Escapingbug/dotaxctf/pull/33))
7272
- [2023/3/29 15:26] feat: print with `[Sandbox.candidate_name.script]` banner when script got an error.([#35](https://github.com/Escapingbug/dotaxctf/pull/35))
73-
- [2023/3/29 21:44] feat: remove all nonempty entities after round ends.([#36](https://github.com/Escapingbug/dotaxctf/pull/36))
73+
- [2023/3/29 21:44] fix: remove all nonempty entities after round ends.([#36](https://github.com/Escapingbug/dotaxctf/pull/36))
74+
- [2023/3/29 22:49] feat: update panel state when round ends.([#37](https://github.com/Escapingbug/dotaxctf/pull/37))

rounds.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ function Rounds:UpdateScoresPanel()
5050
)
5151
end
5252

53+
function Rounds:UpdateRoundEndPanel()
54+
local event = {
55+
round_count = self.round_count
56+
}
57+
CustomGameEventManager:Send_ServerToAllClients(
58+
"roundEnd",
59+
event
60+
)
61+
end
62+
5363
--[[
5464
Send scores to server and reset to 0
5565
]]
@@ -541,6 +551,7 @@ function Rounds:BeginRound(bot_scripts)
541551
callback = function ()
542552
Timers:RemoveTimer("round_periodic_timer")
543553
Rounds:RoundEndedScoring()
554+
Rounds:UpdateRoundEndPanel()
544555
Rounds:FlushScoresAndRunNextRound()
545556
Sandbox:CleanUpItems()
546557
end
@@ -556,6 +567,7 @@ function Rounds:BeginRound(bot_scripts)
556567
if #living_teams <= 1 then
557568
Timers:RemoveTimer("round_limit_timer")
558569
Rounds:RoundEndedScoring()
570+
Rounds:UpdateRoundEndPanel()
559571
Rounds:FlushScoresAndRunNextRound()
560572
Sandbox:CleanUpItems()
561573
return

0 commit comments

Comments
 (0)