From ae0481e9a387e8bd79221ae8a79f718d73ef9f0e Mon Sep 17 00:00:00 2001 From: Fesiug Date: Sat, 21 Sep 2024 16:52:46 -0400 Subject: [PATCH] Your active team is first on the HUD --- gamemodes/benny/gamemode/gamestate.lua | 1 + gamemodes/benny/gamemode/hud.lua | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/gamemodes/benny/gamemode/gamestate.lua b/gamemodes/benny/gamemode/gamestate.lua index 2de482a..c7c026c 100644 --- a/gamemodes/benny/gamemode/gamestate.lua +++ b/gamemodes/benny/gamemode/gamestate.lua @@ -33,6 +33,7 @@ BennyGame.TeamsInPlay = { --5, --6, } +BennyGame.RTeamID = table.Flip( BennyGame.TeamsInPlay ) BennyGame.TeamCount = #BennyGame.TeamsInPlay BennyGame.Gamemodes = { diff --git a/gamemodes/benny/gamemode/hud.lua b/gamemodes/benny/gamemode/hud.lua index f2b9812..5906ed2 100644 --- a/gamemodes/benny/gamemode/hud.lua +++ b/gamemodes/benny/gamemode/hud.lua @@ -487,7 +487,16 @@ function GM:HUDPaint() -- Score local count = 1 + do -- My team + local o = count-1 + S_Push( count%2==1 and (-BARWIDE - 1 - GAP) or (0 + 1 + GAP), (BARTALL+2+16+2)*math.floor(o/2) ) + QuickDrawBar( BARWIDE, BARTALL, myteam, BennyGame.RTeamID[myteam], count%2==0 ) + S_Pop() + count = count + 1 + end + -- Every other team for TeamID, RealTeamID in ipairs( BennyGame.TeamsInPlay ) do + if RealTeamID == myteam then continue end local o = count-1 S_Push( count%2==1 and (-BARWIDE - 1 - GAP) or (0 + 1 + GAP), (BARTALL+2+16+2)*math.floor(o/2) ) QuickDrawBar( BARWIDE, BARTALL, RealTeamID, TeamID, count%2==0 )