Small fix
This commit is contained in:
parent
079f472c71
commit
24e5c0018a
@ -1,22 +1,22 @@
|
||||
require("language")
|
||||
|
||||
if (game:issingleplayer()) then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
if (Engine.InFrontend()) then
|
||||
require("shader_dialog")
|
||||
require("gamemodes")
|
||||
require("no_mode_switch")
|
||||
require("disable_useless_things")
|
||||
require("shader_dialog")
|
||||
require("gamemodes")
|
||||
require("no_mode_switch")
|
||||
require("disable_useless_things")
|
||||
else
|
||||
require("scoreboard")
|
||||
end
|
||||
|
||||
-- defined in mp_hud/hudutils.lua
|
||||
function GetGameModeName()
|
||||
return Engine.Localize(Engine.TableLookup(GameTypesTable.File, GameTypesTable.Cols.Ref, GameX.GetGameMode(),
|
||||
GameTypesTable.Cols.Name))
|
||||
return Engine.Localize(Engine.TableLookup(GameTypesTable.File,
|
||||
GameTypesTable.Cols.Ref, GameX.GetGameMode(), GameTypesTable.Cols.Name))
|
||||
end
|
||||
|
||||
function NeverAllowChangeTeams()
|
||||
return false
|
||||
return false
|
||||
end
|
||||
|
@ -9,32 +9,3 @@ Cac.GameModes.Data = {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Engine.InFrontend()) then
|
||||
return
|
||||
end
|
||||
|
||||
local gametypes = {
|
||||
["dm"] = true,
|
||||
["dom"] = true,
|
||||
["sd"] = true,
|
||||
["war"] = true,
|
||||
["conf"] = true,
|
||||
["vlobby"] = true,
|
||||
["koth"] = true,
|
||||
["sab"] = true,
|
||||
["ctf"] = true,
|
||||
["dd"] = true,
|
||||
["hp"] = true,
|
||||
["gun"] = true,
|
||||
}
|
||||
|
||||
local func = LUI.mp_hud.Scoreboard.DetermineIfSingleTeamGameType
|
||||
LUI.mp_hud.Scoreboard.DetermineIfSingleTeamGameType = function()
|
||||
local gametype = Engine.GetDvarString("ui_gametype")
|
||||
if (gametypes[gametype]) then
|
||||
return func()
|
||||
end
|
||||
|
||||
return Game.GetPlayerTeam() == Teams.free
|
||||
end
|
||||
|
24
data/cdata/ui_scripts/patches/scoreboard.lua
Normal file
24
data/cdata/ui_scripts/patches/scoreboard.lua
Normal file
@ -0,0 +1,24 @@
|
||||
local gametypes = {
|
||||
["dm"] = true,
|
||||
["dom"] = true,
|
||||
["sd"] = true,
|
||||
["war"] = true,
|
||||
["conf"] = true,
|
||||
["vlobby"] = true,
|
||||
["koth"] = true,
|
||||
["sab"] = true,
|
||||
["ctf"] = true,
|
||||
["dd"] = true,
|
||||
["hp"] = true,
|
||||
["gun"] = true,
|
||||
}
|
||||
|
||||
local func = LUI.mp_hud.Scoreboard.DetermineIfSingleTeamGameType
|
||||
LUI.mp_hud.Scoreboard.DetermineIfSingleTeamGameType = function()
|
||||
local gametype = Engine.GetDvarString("ui_gametype")
|
||||
if (gametypes[gametype]) then
|
||||
return func()
|
||||
end
|
||||
|
||||
return Game.GetPlayerTeam() == Teams.free
|
||||
end
|
Loading…
Reference in New Issue
Block a user