Skip to content

Commit

Permalink
Merge pull request #32 from f0rm2l1n/master
Browse files Browse the repository at this point in the history
  • Loading branch information
kdxcxs authored Mar 29, 2023
2 parents 35eeb5f + aa8f9c1 commit 650584a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ All other information should be explored by reading the source code!
- [2023/3/27 23:53] fix: use `npc:GetEntityIndex()` and `npc:GetTeam()` to avoid unexpect behaviors.([#27](https://github.com/Escapingbug/dotaxctf/pull/27), reporter: 114@x1ct34m)
- [2023/3/28 09:11] fix: ban nonhero units for hero choosing.([#31](https://github.com/Escapingbug/dotaxctf/pull/31),reporter: 114@x1ct34m)
- [2023/3/28 09:16] feat: clean up items when round ends.([#30](https://github.com/Escapingbug/dotaxctf/pull/30))
- [2023/3/29 08:46] fix: place history.scores updates to correct loc.([#32](https://github.com/Escapingbug/dotaxctf/pull/32), reporter: AAA剑圣)
11 changes: 6 additions & 5 deletions rounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ end
]]
function Rounds:FlushScoresAndRunNextRound()
print("[xctf Rounds:FlushRoundScores]" .. "Flushing round scores")

if self.round_count > 0 then
local last_scores = deepcopy(self.scores_this_round)
table.insert(self.history.scores, last_scores)
end

local req = CreateHTTPRequest("POST", Config.server_url.service)
if req == nil then
print("[xctf Rounds:FlushRoundScores]" .. "Failed to create http request")
Expand Down Expand Up @@ -296,11 +302,6 @@ end
function Rounds:NextRound(scripts)
print("[xctf Rounds:NextRound()]" .. "Next Round")

if self.round_count > 0 then
local last_scores = deepcopy(self.scores_this_round)
table.insert(self.history.scores, last_scores)
end

Rounds:CleanupLivingHerosAndClearUnits()
Rounds:ChooseHeros(scripts["chooser_scripts"], scripts["attributes"], scripts["bot_scripts"])
Timers:CreateTimer(
Expand Down

0 comments on commit 650584a

Please sign in to comment.