-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kind of a pain to use because the rehlds and hlsdk headers conflict. Include rehlds.h before anything else. Example hook usage: https://github.com/rehlds/revoice/blob/master/revoice/src/revoice_main.cpp#L252
- Loading branch information
Showing
5 changed files
with
42 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,38 @@ | ||
#pragma once | ||
|
||
// handle conflicts between rehlds and hlsdk headers | ||
#ifndef CACHE_USER | ||
typedef enum server_state_e | ||
{ | ||
ss_dead = 0, | ||
ss_loading = 1, | ||
ss_active = 2, | ||
} server_state_t; | ||
|
||
bool RehldsApi_Init(); | ||
using cvar_callback_t = void (*)(const char* pszNewValue); | ||
|
||
typedef struct cache_user_s | ||
{ | ||
void* data; | ||
} cache_user_t; | ||
|
||
#define CACHE_USER | ||
#define SYNCTYPE_T | ||
#define DID_VEC3_T_DEFINE | ||
#define EXT_FUNC | ||
#define EIFACE_H | ||
#endif | ||
|
||
#include "extdll.h" | ||
#include "rehlds/public/rehlds/custom.h" | ||
#include "rehlds/public/interface.h" | ||
#include "rehlds/public/FileSystem.h" | ||
#include "rehlds/public/rehlds/rehlds_api.h" | ||
|
||
bool RehldsApi_Init(); | ||
|
||
EXPORT extern IRehldsApi* g_RehldsApi; | ||
EXPORT extern const RehldsFuncs_t* g_RehldsFuncs; | ||
EXPORT extern IRehldsServerData* g_RehldsData; | ||
EXPORT extern IRehldsHookchains* g_RehldsHookchains; | ||
EXPORT extern IRehldsServerStatic* g_RehldsSvs; |