mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Remove Damage Indications when entering game (fixes #29)
This commit is contained in:
parent
f66febb009
commit
4133e642f8
|
@ -631,6 +631,8 @@ void CClient::OnEnterGame()
|
|||
|
||||
if (g_Config.m_ClDummy == 0)
|
||||
m_LastDummyConnectTime = 0;
|
||||
|
||||
GameClient()->OnEnterGame();
|
||||
}
|
||||
|
||||
void CClient::EnterGame()
|
||||
|
|
|
@ -83,5 +83,10 @@ void CDamageInd::OnRender()
|
|||
Graphics()->QuadsEnd();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CDamageInd::Reset()
|
||||
{
|
||||
for(int i = 0; i < m_NumItems;)
|
||||
{
|
||||
DestroyI(&m_aItems[i]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ public:
|
|||
CDamageInd();
|
||||
|
||||
void Create(vec2 Pos, vec2 Dir);
|
||||
void Reset();
|
||||
virtual void OnRender();
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -55,6 +55,11 @@ void CEffects::DamageIndicator(vec2 Pos, vec2 Dir)
|
|||
m_pClient->m_pDamageind->Create(Pos, Dir);
|
||||
}
|
||||
|
||||
void CEffects::ResetDamageIndicator()
|
||||
{
|
||||
m_pClient->m_pDamageind->Reset();
|
||||
}
|
||||
|
||||
void CEffects::PowerupShine(vec2 Pos, vec2 size)
|
||||
{
|
||||
if(!m_Add50hz)
|
||||
|
|
|
@ -20,6 +20,7 @@ public:
|
|||
void HammerHit(vec2 Pos);
|
||||
void AirJump(vec2 Pos);
|
||||
void DamageIndicator(vec2 Pos, vec2 Dir);
|
||||
void ResetDamageIndicator();
|
||||
void PlayerSpawn(vec2 Pos);
|
||||
void PlayerDeath(vec2 Pos, int ClientID);
|
||||
void PowerupShine(vec2 Pos, vec2 Size);
|
||||
|
|
|
@ -751,7 +751,10 @@ void CGameClient::OnShutdown()
|
|||
m_pRaceDemo->OnShutdown();
|
||||
}
|
||||
|
||||
void CGameClient::OnEnterGame() {}
|
||||
void CGameClient::OnEnterGame()
|
||||
{
|
||||
g_GameClient.m_pEffects->ResetDamageIndicator();
|
||||
}
|
||||
|
||||
void CGameClient::OnGameOver()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue