Skip to content

Commit bbed3af

Browse files
committed
Remove msg hook
1 parent 8c5a617 commit bbed3af

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

cl_dll/battery.cpp

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,6 @@
2727

2828
DECLARE_MESSAGE(m_Battery, Battery)
2929

30-
void HUD_StopSound()
31-
{
32-
gEngfuncs.pfnPlaySoundByName("player/shield_empty.wav", 0);
33-
}
34-
35-
int MsgFunc_StopSound(const char *pszName, int iSize, void* pbuf)
36-
{
37-
HUD_StopSound();
38-
return 1;
39-
}
40-
4130
int CHudBattery::Init(void)
4231
{
4332
m_iBat = 0;
@@ -48,8 +37,6 @@ int CHudBattery::Init(void)
4837

4938
gHUD.AddHudElem(this);
5039

51-
gEngfuncs.pfnHookUserMsg("StopSound", MsgFunc_StopSound);
52-
5340
return 1;
5441
};
5542

@@ -94,6 +81,7 @@ int CHudBattery:: MsgFunc_Battery(const char *pszName, int iSize, void *pbuf )
9481
return 1;
9582
}
9683

84+
9785
int CHudBattery::Draw(float flTime)
9886
{
9987
if (gHUD.m_iHideHUDDisplay & HIDEHUD_HEALTH)
@@ -140,11 +128,12 @@ int CHudBattery::Draw(float flTime)
140128
Blinking = true;
141129
}
142130

143-
a = (int)(fabs(sin(flTime * 10)) * 256.0);
144-
}
145-
else
146-
{
147-
Blinking = false;
131+
a = (int)(fabs(sin(flTime * 10)) * 256.0);
132+
}
133+
else
134+
{
135+
Blinking = false;
136+
148137

149138
if (0 != m_fFade) // Has health changed? Flash the health #
150139
{

0 commit comments

Comments
 (0)