blob: 3ac3e3c9de84454cc1cd5861d9bef96dccb69adb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//
#include "cbase.h"
#include "hudelement.h"
#include <vgui_controls/Panel.h>
#include <vgui/ISurface.h>
#include "clientmode_csnormal.h"
#include "c_cs_player.h"
#include "materialsystem/imaterialsystemhardwareconfig.h"
class CHudFlashbang : public CHudElement, public vgui::Panel
{
public:
DECLARE_CLASS_SIMPLE( CHudFlashbang, vgui::Panel );
virtual bool ShouldDraw();
virtual void Paint();
CHudFlashbang( const char *name );
private:
int m_iAdditiveWhiteID;
};
DECLARE_HUDELEMENT( CHudFlashbang );
CHudFlashbang::CHudFlashbang( const char *pName ) :
vgui::Panel( NULL, "HudFlashbang" ), CHudElement( pName )
{
SetParent( g_pClientMode->GetViewport() );
m_iAdditiveWhiteID = 0;
SetHiddenBits( HIDEHUD_PLAYERDEAD );
}
// the flashbang effect cannot be drawn in the HUD, because this lets the user skip its effect
// by hitting Escape, or by setting "cl_drawhud 0".
bool CHudFlashbang::ShouldDraw()
{
return true;
}
// the flashbang effect cannot be drawn in the HUD, because this lets the user skip its effect
// by hitting Escape, or by setting "cl_drawhud 0".
void CHudFlashbang::Paint()
{
return;
}
|