Skip to content
Merged
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: 2 additions & 2 deletions src/game/client/neo/c_neo_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
15 changes: 15 additions & 0 deletions src/game/shared/neo/neo_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
4 changes: 4 additions & 0 deletions src/game/shared/neo/neo_gamerules.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down