-
Notifications
You must be signed in to change notification settings - Fork 1
/
extension.h
50 lines (42 loc) · 1.44 KB
/
extension.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
49
50
#pragma once
#include "smsdk_ext.h"
#include <IBinTools.h>
class IHandleEntity;
class CSurvivorBotBlockersFix : public SDKExtension
{
public:
/**
* @brief This is called after the initial loading sequence has been processed.
*
* @param error Error message buffer.
* @param maxlen Size of error message buffer.
* @param late Whether or not the module was loaded after map load.
* @return True to succeed loading, false to fail.
*/
virtual bool SDK_OnLoad(char *error, size_t maxlen, bool late) override;
/**
* @brief This is called once all known extensions have been loaded.
* Note: It is is a good idea to add natives here, if any are provided.
*/
virtual void SDK_OnAllLoaded() override;
/**
* @brief This is called right before the extension is unloaded.
*/
virtual void SDK_OnUnload() override;
#ifdef SMEXT_CONF_METAMOD
/**
* @brief Called when Metamod is attached, before the extension version is called.
*
* @param error Error buffer.
* @param maxlen Maximum size of error buffer.
* @param late Whether or not Metamod considers this a late load.
* @return True to succeed, false to fail.
*/
virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late) override;
#endif
private:
void *m_pfn_NextBotTraversableTraceFilter_vtable;
int m_nSHookID;
bool Hook_NextBotTraversableTraceFilter_ShouldHitEntity(IHandleEntity *pServerEntity, int fContentsMask);
IBinTools *m_pBinTools;
};