Skip to content

Commit

Permalink
Merge pull request #28 from klavssprugevics/develop
Browse files Browse the repository at this point in the history
Added a delay before starting the mapvote.
  • Loading branch information
ksprugevics committed Jan 10, 2023
2 parents dad72fc + e082efa commit 21bbf4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lua/client/vgui/rmv_mapvote_panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ end

local function createVLabel()
local versionLabel = vgui.Create("DLabel", RMV_GUI_ELEMENTS.RMV_MAPVOTE_PANEL)
versionLabel:SetText("R" .. "a" .."f" .. "'" .. "s" .. "M" .. "a" .. "p" .. "V" .. "o" .. "t" .. "e" .. " " .. "v" .."1" .."." .. "0" .. "." .. "3")
versionLabel:SetText("R" .. "a" .."f" .. "'" .. "s" .. "M" .. "a" .. "p" .. "V" .. "o" .. "t" .. "e" .. " " .. "v" .."1" .."." .. "0" .. "." .. "5")
versionLabel:SetPos(PANEL_WIDTH - 62, THUMBNAIL_COORDS["extend"][4] + 5)
versionLabel:SetFont("RMVVersionFont")
versionLabel:SetTextColor(Color(255, 255, 255, 200))
Expand Down
10 changes: 6 additions & 4 deletions lua/server/integration/rmv_ttt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,21 @@ hook.Add("TTTEndRound", "CheckMapvote", function()

if rounds_left <= 0 then
switchmap = true
Log("Round limit reached. Starting mapvote..")
Log("Round limit reached. Starting mapvote soon..")
elseif time_left <= 0 then
switchmap = true
Log("Time limit reached. Starting mapvote..")
Log("Time limit reached. Starting mapvote soon..")
end

if switchmap then
timer.Stop("end2prep")
StartRafsMapvote()
timer.Simple(5, function()
StartRafsMapvote()
end)
else
LANG.Msg("limit_left", {num = rounds_left,
time = math.ceil(time_left / 60),
mapname = nextmap})
mapname = "the next map"})
end
end
end)

0 comments on commit 21bbf4b

Please sign in to comment.