Your active team is first on the HUD

This commit is contained in:
Fesiug 2024-09-21 16:52:46 -04:00
parent efb50f2c5e
commit ae0481e9a3
Signed by: Fesiug
GPG Key ID: 374BFF45E1EEF243
2 changed files with 10 additions and 0 deletions

View File

@ -33,6 +33,7 @@ BennyGame.TeamsInPlay = {
--5, --5,
--6, --6,
} }
BennyGame.RTeamID = table.Flip( BennyGame.TeamsInPlay )
BennyGame.TeamCount = #BennyGame.TeamsInPlay BennyGame.TeamCount = #BennyGame.TeamsInPlay
BennyGame.Gamemodes = { BennyGame.Gamemodes = {

View File

@ -487,7 +487,16 @@ function GM:HUDPaint()
-- Score -- Score
local count = 1 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 for TeamID, RealTeamID in ipairs( BennyGame.TeamsInPlay ) do
if RealTeamID == myteam then continue end
local o = count-1 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) ) 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 ) QuickDrawBar( BARWIDE, BARTALL, RealTeamID, TeamID, count%2==0 )