From 1eb37d9fb7780eb9dff58b4fbc169bc19491f314 Mon Sep 17 00:00:00 2001 From: AdamTadeusz Date: Thu, 25 Dec 2025 11:28:50 +0000 Subject: [PATCH 1/2] init --- src/game/client/neo/c_neo_player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/client/neo/c_neo_player.cpp b/src/game/client/neo/c_neo_player.cpp index c4be2d455f..c2a1be6965 100644 --- a/src/game/client/neo/c_neo_player.cpp +++ b/src/game/client/neo/c_neo_player.cpp @@ -1466,7 +1466,7 @@ void C_NEO_Player::UpdateGlowEffects(int iNewTeam) } updateGlowColour(pPlayer); - if (iNewTeam == TEAM_SPECTATOR || iNewTeam == pPlayer->GetTeamNumber()) { + if (iNewTeam == TEAM_SPECTATOR || (NEORules()->IsTeamplay() && iNewTeam == pPlayer->GetTeamNumber())) { pPlayer->SetClientSideGlowEnabled(true); } else { // ditto wrt mp_forcecamera check @@ -1483,7 +1483,7 @@ void C_NEO_Player::UpdateGlowEffects(int iNewTeam) updateGlowColour(this, iNewTeam); int localPlayerTeam = GetLocalPlayerTeam(); - if (localPlayerTeam == TEAM_SPECTATOR || localPlayerTeam == iNewTeam) { + if (localPlayerTeam == TEAM_SPECTATOR || (NEORules()->IsTeamplay() && localPlayerTeam == iNewTeam)) { SetClientSideGlowEnabled(true); } else { // ditto wrt mp_forcecamera check From 2c188984b821785734418fe594bed204e791c558 Mon Sep 17 00:00:00 2001 From: AdamTadeusz Date: Wed, 14 Jan 2026 11:40:32 +0000 Subject: [PATCH 2/2] recalculate glows when the gamemode changes --- src/game/shared/neo/neo_gamerules.cpp | 15 +++++++++++++++ src/game/shared/neo/neo_gamerules.h | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/src/game/shared/neo/neo_gamerules.cpp b/src/game/shared/neo/neo_gamerules.cpp index 99c09c6b75..167e3ec557 100644 --- a/src/game/shared/neo/neo_gamerules.cpp +++ b/src/game/shared/neo/neo_gamerules.cpp @@ -218,6 +218,21 @@ void sndVictoryVolumeChangeCallback(IConVar* cvar [[maybe_unused]], const char* ConVar snd_victory_volume("snd_victory_volume", "0.33", FCVAR_ARCHIVE | FCVAR_DONTRECORD | FCVAR_USERINFO, "Loudness of the victory jingle (0-1).", true, 0.0, true, 1.0, sndVictoryVolumeChangeCallback); #endif // CLIENT_DLL +#ifdef CLIENT_DLL +void CNEOGameRulesProxy::OnDataChanged(DataUpdateType_t updateType) +{ + BaseClass::OnDataChanged(updateType); + + static int oldGameType = NEORules()->GetGameType(); + if (NEORules()->GetGameType() != oldGameType) + { + oldGameType = NEORules()->GetGameType(); + C_NEO_Player* pLocalNeoPlayer = C_NEO_Player::GetLocalNEOPlayer(); + pLocalNeoPlayer->UpdateGlowEffects(pLocalNeoPlayer->GetTeamNumber()); + } +} +#endif // CLIENT_DLL + REGISTER_GAMERULES_CLASS( CNEORules ); BEGIN_NETWORK_TABLE_NOBASE( CNEORules, DT_NEORules ) diff --git a/src/game/shared/neo/neo_gamerules.h b/src/game/shared/neo/neo_gamerules.h index 988c60abc0..496a90030d 100644 --- a/src/game/shared/neo/neo_gamerules.h +++ b/src/game/shared/neo/neo_gamerules.h @@ -40,6 +40,10 @@ class CNEOGameRulesProxy : public CHL2MPGameRulesProxy public: DECLARE_CLASS( CNEOGameRulesProxy, CHL2MPGameRulesProxy ); DECLARE_NETWORKCLASS(); + +#ifdef CLIENT_DLL + void OnDataChanged(DataUpdateType_t updateType) override; +#endif // CLIENT_DLL }; class NEOViewVectors : public HL2MPViewVectors