diff --git a/src/game/client/neo/c_neo_player.cpp b/src/game/client/neo/c_neo_player.cpp index 19a63a3b6..626a3a5c4 100644 --- a/src/game/client/neo/c_neo_player.cpp +++ b/src/game/client/neo/c_neo_player.cpp @@ -1490,7 +1490,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 @@ -1507,7 +1507,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 diff --git a/src/game/shared/neo/neo_gamerules.cpp b/src/game/shared/neo/neo_gamerules.cpp index 99c09c6b7..167e3ec55 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 988c60abc..496a90030 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