Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/game/client/neo/ui/neo_hud_round_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@ void CNEOHud_RoundState::ApplySchemeSettings(vgui::IScheme* pScheme)
SetZPos(90);
}

extern ConVar sv_neo_readyup_lobby;

void CNEOHud_RoundState::UpdateStateForNeoHudElementDraw()
{
float roundTimeLeft = NEORules()->GetRoundRemainingTime();
Expand All @@ -258,7 +256,7 @@ void CNEOHud_RoundState::UpdateStateForNeoHudElementDraw()
m_pWszStatusUnicode = L"";
if (roundStatus == NeoRoundStatus::Idle)
{
m_pWszStatusUnicode = sv_neo_readyup_lobby.GetBool() ? L"Waiting for players to ready up" : L"Waiting for players";
m_pWszStatusUnicode = NEORules()->IsReadyUpEnabled() ? L"Waiting for players to ready up" : L"Waiting for players";
}
else if (roundStatus == NeoRoundStatus::Warmup)
{
Expand Down
6 changes: 1 addition & 5 deletions src/game/client/neo/ui/neo_scoreboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ ConVar neo_show_scoreboard_avatars("neo_show_scoreboard_avatars", "1", FCVAR_ARC
ConVar cl_neo_hud_scoreboard_padding("cl_neo_hud_scoreboard_padding", "0", FCVAR_ARCHIVE, "Adjust scoreboard space padding. 0 = default, 1 = compact, 2 = spacious", true, 0.0f, true, 2.0f);
extern ConVar cl_neo_streamermode;
extern ConVar cl_neo_squad_hud_original;
extern ConVar sv_neo_readyup_lobby;
extern ConVar cl_neo_hud_team_swap_sides;

enum ENeoScoreBoardPopup
Expand Down Expand Up @@ -583,10 +582,7 @@ void CNEOScoreBoard::OnMainLoop(const NeoUI::Mode eMode)
const int iAvatarOffset = m_uiCtx.iMarginX;
const int iAvatarWT = ShowAvatars() ? (iPopupCardPerRowTallAvatarName - (iAvatarOffset * 2)) : 0;
const bool bIsTeamplay = NEORules()->IsTeamplay();
const int iGameType = NEORules()->GetGameType();
const bool bShowReadyUp = sv_neo_readyup_lobby.GetBool()
&& NEORules()->m_nRoundStatus == NeoRoundStatus::Idle
&& NEO_GAME_TYPE_SETTINGS[iGameType].comp;
const bool bShowReadyUp = NEORules()->InReadyUpState();
const bool bShowDamageInfo = pLocalPlayer->IsPlayerDead()
&& NEORules()->InRoundState()
&& g_neoKillerInfos.bHasDmgInfos
Expand Down
14 changes: 10 additions & 4 deletions src/game/shared/neo/neo_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ void CNEORules::ResetMapSessionCommon()
void CNEORules::ChangeLevel(void)
{
ResetMapSessionCommon();
if (!m_bRotatingMapRightNow && sv_neo_readyup_lobby.GetBool() && !sv_neo_readyup_autointermission.GetBool())
if (!m_bRotatingMapRightNow && IsReadyUpEnabled() && !sv_neo_readyup_autointermission.GetBool())
{
m_bChangelevelDone = false;
}
Expand Down Expand Up @@ -1371,7 +1371,7 @@ void CNEORules::Think(void)
gameeventmanager->FireEvent(event);
}

if (sv_neo_readyup_lobby.GetBool() && !sv_neo_readyup_autointermission.GetBool())
if (IsReadyUpEnabled() && !sv_neo_readyup_autointermission.GetBool())
{
ResetMapSessionCommon();
}
Expand Down Expand Up @@ -2689,7 +2689,7 @@ void CNEORules::StartNextRound()
|| GetGlobalTeam(TEAM_JINRAI)->GetNumPlayers() != GetGlobalTeam(TEAM_NSF)->GetNumPlayers()))
)
{
if (sv_neo_readyup_lobby.GetBool())
if (bLobby)
{
bool bPrintHelpInfo = (m_iPrintHelpCounter == 0);
if (!m_bIgnoreOverThreshold && (readyPlayers.array[TEAM_JINRAI] > iThres || readyPlayers.array[TEAM_NSF] > iThres))
Expand Down Expand Up @@ -4735,9 +4735,15 @@ bool CNEORules::IsJuggernautLocked() const
return false;
}

bool CNEORules::IsReadyUpEnabled() const
{
return (sv_neo_readyup_lobby.GetBool()
&& NEO_GAME_TYPE_SETTINGS[m_nGameTypeSelected].comp);
}

bool CNEORules::InReadyUpState() const
{
return (sv_neo_readyup_lobby.GetBool() && m_nRoundStatus == NeoRoundStatus::Idle);
return (IsReadyUpEnabled() && m_nRoundStatus == NeoRoundStatus::Idle);
}

bool CNEORules::InRoundState() const
Expand Down
1 change: 1 addition & 0 deletions src/game/shared/neo/neo_gamerules.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ class CNEORules : public CHL2MPRules, public CGameEventListener
const Vector& GetJuggernautMarkerPos() const;
bool IsJuggernautLocked() const;

bool IsReadyUpEnabled() const;
bool InReadyUpState() const;
bool InRoundState() const;

Expand Down