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
5 changes: 5 additions & 0 deletions game/neo/resource/NeoModEvents.res
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@

}

"game_freezetime_end"
{

}

// inherited from NT
"game_round_end"
{
Expand Down
18 changes: 15 additions & 3 deletions src/game/client/neo/c_neo_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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))
{
Expand Down Expand Up @@ -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();
}
}
1 change: 1 addition & 0 deletions src/game/client/neo/c_neo_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
21 changes: 12 additions & 9 deletions src/game/client/neo/ui/neo_scoreboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +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()->InRoundState()
&& bLocalPlaying;
const bool bShowDamageInfo =
bLocalPlaying
&& ((pLocalPlayer->IsPlayerDead() && NEORules()->IsRoundOn())
|| (NEORules()->GetRoundStatus() == NeoRoundStatus::PreRoundFreeze
|| NEORules()->GetRoundStatus() == NeoRoundStatus::Pause));

// Zero array every update
m_iTotalPlayers = 0;
Expand Down Expand Up @@ -434,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)
Expand Down Expand Up @@ -585,11 +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()->InRoundState()
&& 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;
Expand Down
5 changes: 5 additions & 0 deletions src/game/shared/neo/neo_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down