From d9fa5403448194073c37aa28bb686d5925c90e87 Mon Sep 17 00:00:00 2001 From: AdamTadeusz Date: Tue, 4 Aug 2026 10:05:44 +0100 Subject: [PATCH 1/2] init --- game/neo/resource/NeoModEvents.res | 5 +++++ .../client/neo/c_neo_killer_damage_infos.cpp | 2 +- src/game/client/neo/c_neo_player.cpp | 18 +++++++++++++++--- src/game/client/neo/c_neo_player.h | 1 + src/game/client/neo/ui/neo_scoreboard.cpp | 9 +++------ src/game/shared/neo/neo_gamerules.cpp | 5 +++++ 6 files changed, 30 insertions(+), 10 deletions(-) diff --git a/game/neo/resource/NeoModEvents.res b/game/neo/resource/NeoModEvents.res index 9d62eb6227..bffdd76287 100644 --- a/game/neo/resource/NeoModEvents.res +++ b/game/neo/resource/NeoModEvents.res @@ -107,6 +107,11 @@ } + "game_freezetime_end" + { + + } + // inherited from NT "game_round_end" { diff --git a/src/game/client/neo/c_neo_killer_damage_infos.cpp b/src/game/client/neo/c_neo_killer_damage_infos.cpp index a8c183ce84..4b506d7469 100644 --- a/src/game/client/neo/c_neo_killer_damage_infos.cpp +++ b/src/game/client/neo/c_neo_killer_damage_infos.cpp @@ -203,7 +203,7 @@ static void __MsgFunc_KillerDamageInfo(bf_read &msg) ConMsg("%sDamage infos (Round %d):\n%s\n", BORDER, NEORules()->roundNumber(), setKillByLine ? killByLine : ""); - NeoDamageReportClear(); + //NeoDamageReportClear(); gTotals = {}; const ENEOCompactMsgFlag flags = ReadDamageReport(msg); if (!(flags & NEO_COMPACT_MSG_FLAG_EXTRA)) diff --git a/src/game/client/neo/c_neo_player.cpp b/src/game/client/neo/c_neo_player.cpp index 0b6563fae7..1a76c8416c 100644 --- a/src/game/client/neo/c_neo_player.cpp +++ b/src/game/client/neo/c_neo_player.cpp @@ -472,8 +472,13 @@ C_NEO_Player::C_NEO_Player() m_flTocFactor = 0.15f; memset(m_szNeoNameWDupeIdx, 0, sizeof(m_szNeoNameWDupeIdx)); - ClearLocalPlayerDmgReports(); m_szNameDupePos = 0; + + if (IsLocalPlayer()) + { + ListenForGameEvent( "game_freezetime_end" ); + ClearLocalPlayerDmgReports(); + } } C_NEO_Player::~C_NEO_Player() @@ -1187,8 +1192,6 @@ void C_NEO_Player::PreThink( void ) CLocalPlayerFilter filter; enginesound->SetPlayerDSP(filter, 0, true); - ClearLocalPlayerDmgReports(); - // Reset the cache of other players crosshair data on spawning in if (CHudCrosshair *crosshair = GET_HUDELEMENT(CHudCrosshair)) { @@ -2148,3 +2151,12 @@ void C_NEO_Player::ClearLocalPlayerDmgReports() NeoAllKDReportsClear(); } } + +void C_NEO_Player::FireGameEvent(IGameEvent* event) +{ + auto eventName = event->GetName(); + if (!Q_stricmp(eventName, "game_freezetime_end")) + { + NeoAllKDReportsClear(); + } +} \ No newline at end of file diff --git a/src/game/client/neo/c_neo_player.h b/src/game/client/neo/c_neo_player.h index 607d7185e9..8ca4e11bf5 100644 --- a/src/game/client/neo/c_neo_player.h +++ b/src/game/client/neo/c_neo_player.h @@ -47,6 +47,7 @@ class C_NEO_Player : public C_HL2MP_Player virtual void AddPoints(int score, bool bAllowNegativeScore, bool bIgnorePlayerTakeover = false); virtual void PreDataUpdate(DataUpdateType_t updateType) OVERRIDE; + virtual void FireGameEvent( IGameEvent * event ) override; // Should this object cast shadows? virtual ShadowType_t ShadowCastType( void ); diff --git a/src/game/client/neo/ui/neo_scoreboard.cpp b/src/game/client/neo/ui/neo_scoreboard.cpp index 4946f51477..7c2b19ab41 100644 --- a/src/game/client/neo/ui/neo_scoreboard.cpp +++ b/src/game/client/neo/ui/neo_scoreboard.cpp @@ -337,8 +337,7 @@ void CNEOScoreBoard::Update() const bool bLocalPlaying = (TEAM_JINRAI == iLocalPlayerTeam || TEAM_NSF == iLocalPlayerTeam); const bool bIsTeamplay = NEORules()->IsTeamplay(); - const bool bShowDamageInfo = pLocalPlayer->IsPlayerDead() - && NEORules()->InRoundState() + const bool bShowDamageInfo = (pLocalPlayer->IsPlayerDead() && NEORules()->IsRoundOn()) || (NEORules()->GetRoundStatus() == NeoRoundStatus::PreRoundFreeze || NEORules()->GetRoundStatus() == NeoRoundStatus::Pause) && bLocalPlaying; // Zero array every update @@ -585,11 +584,9 @@ void CNEOScoreBoard::OnMainLoop(const NeoUI::Mode eMode) const bool bIsTeamplay = NEORules()->IsTeamplay(); const bool bShowReadyUp = sv_neo_readyup_lobby.GetBool() && NEORules()->m_nRoundStatus == NeoRoundStatus::Idle; - const bool bShowDamageInfo = pLocalPlayer->IsPlayerDead() - && NEORules()->InRoundState() + const bool bShowDamageInfo = (pLocalPlayer->IsPlayerDead() && NEORules()->IsRoundOn()) || (NEORules()->GetRoundStatus() == NeoRoundStatus::PreRoundFreeze || NEORules()->GetRoundStatus() == NeoRoundStatus::Pause) && g_neoKillerInfos.bHasDmgInfos - && (pLocalPlayer->GetTeamNumber() == TEAM_JINRAI - || pLocalPlayer->GetTeamNumber() == TEAM_NSF); + && (pLocalPlayer->GetTeamNumber() == TEAM_JINRAI || pLocalPlayer->GetTeamNumber() == TEAM_NSF); static CrosshairInfo staticXhairInfo = {}; bool bHasRanklessDog = false; diff --git a/src/game/shared/neo/neo_gamerules.cpp b/src/game/shared/neo/neo_gamerules.cpp index b6faeae680..edef756cef 100644 --- a/src/game/shared/neo/neo_gamerules.cpp +++ b/src/game/shared/neo/neo_gamerules.cpp @@ -4577,6 +4577,11 @@ void CNEORules::SetRoundStatus(NeoRoundStatus status) { pEntGameCfg->m_OnRoundStart.FireOutput(nullptr, pEntGameCfg); } + + if (IGameEvent* event = gameeventmanager->CreateEvent("game_freezetime_end")) + { + gameeventmanager->FireEvent(event); + } } #endif } From 1bd6a55fbc7e07b5628b04abfcbc11241cb54df4 Mon Sep 17 00:00:00 2001 From: AdamTadeusz Date: Tue, 4 Aug 2026 14:37:24 +0100 Subject: [PATCH 2/2] don't show class in freeze and pause --- .../client/neo/c_neo_killer_damage_infos.cpp | 2 +- src/game/client/neo/ui/neo_scoreboard.cpp | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/game/client/neo/c_neo_killer_damage_infos.cpp b/src/game/client/neo/c_neo_killer_damage_infos.cpp index 4b506d7469..a8c183ce84 100644 --- a/src/game/client/neo/c_neo_killer_damage_infos.cpp +++ b/src/game/client/neo/c_neo_killer_damage_infos.cpp @@ -203,7 +203,7 @@ static void __MsgFunc_KillerDamageInfo(bf_read &msg) ConMsg("%sDamage infos (Round %d):\n%s\n", BORDER, NEORules()->roundNumber(), setKillByLine ? killByLine : ""); - //NeoDamageReportClear(); + NeoDamageReportClear(); gTotals = {}; const ENEOCompactMsgFlag flags = ReadDamageReport(msg); if (!(flags & NEO_COMPACT_MSG_FLAG_EXTRA)) diff --git a/src/game/client/neo/ui/neo_scoreboard.cpp b/src/game/client/neo/ui/neo_scoreboard.cpp index 7c2b19ab41..78cf3a2895 100644 --- a/src/game/client/neo/ui/neo_scoreboard.cpp +++ b/src/game/client/neo/ui/neo_scoreboard.cpp @@ -337,8 +337,11 @@ void CNEOScoreBoard::Update() const bool bLocalPlaying = (TEAM_JINRAI == iLocalPlayerTeam || TEAM_NSF == iLocalPlayerTeam); const bool bIsTeamplay = NEORules()->IsTeamplay(); - const bool bShowDamageInfo = (pLocalPlayer->IsPlayerDead() && NEORules()->IsRoundOn()) || (NEORules()->GetRoundStatus() == NeoRoundStatus::PreRoundFreeze || NEORules()->GetRoundStatus() == NeoRoundStatus::Pause) - && bLocalPlaying; + const bool bShowDamageInfo = + bLocalPlaying + && ((pLocalPlayer->IsPlayerDead() && NEORules()->IsRoundOn()) + || (NEORules()->GetRoundStatus() == NeoRoundStatus::PreRoundFreeze + || NEORules()->GetRoundStatus() == NeoRoundStatus::Pause)); // Zero array every update m_iTotalPlayers = 0; @@ -433,7 +436,8 @@ void CNEOScoreBoard::Update() || (bIsTeamplay && iLocalPlayerTeam == pPlayerInfo->iTeam) // Team - See own team's classes || (bShowDamageInfo && ((pPlayerInfo->iDealtDmgs > 0 && pPlayerInfo->iDealtHits > 0) - || (pPlayerInfo->iTakenDmgs > 0 && pPlayerInfo->iTakenHits > 0))); // Dead and have damage dealt/taken + || (pPlayerInfo->iTakenDmgs > 0 && pPlayerInfo->iTakenHits > 0)) // Dead and have damage dealt/taken + && !(NEORules()->GetRoundStatus() == NeoRoundStatus::PreRoundFreeze || NEORules()->GetRoundStatus() == NeoRoundStatus::Pause)); if (bShowClass) { pPlayerInfo->iClass = (bIsImpersonating) @@ -584,9 +588,11 @@ void CNEOScoreBoard::OnMainLoop(const NeoUI::Mode eMode) const bool bIsTeamplay = NEORules()->IsTeamplay(); const bool bShowReadyUp = sv_neo_readyup_lobby.GetBool() && NEORules()->m_nRoundStatus == NeoRoundStatus::Idle; - const bool bShowDamageInfo = (pLocalPlayer->IsPlayerDead() && NEORules()->IsRoundOn()) || (NEORules()->GetRoundStatus() == NeoRoundStatus::PreRoundFreeze || NEORules()->GetRoundStatus() == NeoRoundStatus::Pause) - && g_neoKillerInfos.bHasDmgInfos - && (pLocalPlayer->GetTeamNumber() == TEAM_JINRAI || pLocalPlayer->GetTeamNumber() == TEAM_NSF); + const bool bShowDamageInfo = + g_neoKillerInfos.bHasDmgInfos + && (pLocalPlayer->GetTeamNumber() == TEAM_JINRAI || pLocalPlayer->GetTeamNumber() == TEAM_NSF) + && ((pLocalPlayer->IsPlayerDead() && NEORules()->IsRoundOn()) + || (NEORules()->GetRoundStatus() == NeoRoundStatus::PreRoundFreeze || NEORules()->GetRoundStatus() == NeoRoundStatus::Pause)); static CrosshairInfo staticXhairInfo = {}; bool bHasRanklessDog = false;