forked from CSGOLeaks/supremacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhud.h
42 lines (36 loc) · 819 Bytes
/
hud.h
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
#pragma once
struct NoticeText_t {
wchar_t text[ 512 ];
int unk0; // 0x400
float unk1; // 0x404
float unk2; // 0x408
int unk3; // 0x40C
float time; // 0x410
int unk4; // 0x414
float fade; // 0x418
int unk5; // 0x41C
};
struct KillFeed_t {
PAD( 0x7C );
CUtlVector< NoticeText_t > notices;
};
class CHudElement {
public:
__forceinline const char* GetName( ) {
return util::get_method< const char*( __thiscall* )( void* ) >( this, 12 )( this );
}
};
class CHud {
public:
PAD( 0x1C );
CUtlVector< CHudElement* > list;
public:
__forceinline CHudElement* FindElement( hash32_t hash ) {
size_t size = list.Count( );
for( size_t i{}; i < size; ++i ) {
if( FNV1a::get( list[ i ]->GetName( ) ) == hash )
return list[ i ];
}
return nullptr;
}
};