-
Notifications
You must be signed in to change notification settings - Fork 0
/
CompatWrappers.h
48 lines (40 loc) · 1.39 KB
/
CompatWrappers.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
43
44
45
46
47
48
#ifndef __INCLUDE_COMPATWRAPPERS_H__
#define __INCLUDE_COMPATWRAPPERS_H__
#include "HL2SDK.h"
#if SOURCE_ENGINE >= SE_ORANGEBOX
#define CONVAR_REGISTER(object) ConVar_Register(0, object)
bool IsFlagSet(ConCommandBase *cmd, int flag);
void InsertServerCommand(const char *buf);
ConCommandBase *FindCommandBase(const char *name);
ConCommand *FindCommand(const char *name);
#else
class CCommand {
public:
inline const char *ArgS() const {
return engine->Cmd_Args();
}
inline int ArgC() const {
return engine->Cmd_Argc();
}
inline const char *Arg(int index) const {
return engine->Cmd_Argv(index);
}
};
bool IsFlagSet(ConCommandBase *cmd, int flag);
void InsertServerCommand(const char *buf);
ConCommandBase *FindCommandBase(const char *name);
ConCommand *FindCommand(const char *name);
#define CVAR_INTERFACE_VERSION VENGINE_CVAR_INTERFACE_VERSION
#define CONVAR_REGISTER(object) ConCommandBaseMgr::OneTimeInit(object)
typedef FnChangeCallback FnChangeCallback_t;
#endif //SOURCE_ENGINE >= SE_ORANGEBOX
#if SOURCE_ENGINE >= SE_LEFT4DEAD
int IndexOfEdict(const edict_t *pEdict);
edict_t *PEntityOfEntIndex(int iEntIndex);
int GetTypeDescOffs(typedescription_t *td);
#else
int IndexOfEdict(const edict_t *pEdict);
edict_t *PEntityOfEntIndex(int iEntIndex);
int GetTypeDescOffs(typedescription_t *td);
#endif //SOURCE_ENGINE >= SE_LEFT4DEAD
#endif