Fix compile for default sourcemod and new SDK
This commit is contained in:
parent
9fa56918d6
commit
978df62e83
@ -615,7 +615,7 @@ void UpdateQueryCache()
|
||||
IServer *ihltvserver = hltv->GetBaseServer();
|
||||
if(ihltvserver)
|
||||
{
|
||||
info.iHLTVUDPPort = ihltvserver->GetUDPPort();
|
||||
info.iHLTVUDPPort = ihltvserver->GetLocalUDPPort();
|
||||
info.aHLTVNameLen = strlcpy(info.aHLTVName, ihltvserver->GetName(), sizeof(info.aHLTVName));
|
||||
info.nNewFlags |= 0x40;
|
||||
}
|
||||
@ -1103,7 +1103,7 @@ void Connect::SDK_OnAllLoaded()
|
||||
|
||||
info.aVersionLen = snprintf(info.aVersion, sizeof(info.aVersion), "%d", engine->GetServerVersion());
|
||||
|
||||
info.iUDPPort = iserver->GetUDPPort();
|
||||
info.iUDPPort = iserver->GetLocalUDPPort();
|
||||
info.nNewFlags |= 0x80;
|
||||
|
||||
info.iGameID = info.iSteamAppID;
|
||||
|
16
extension.h
16
extension.h
@ -142,3 +142,19 @@ public:
|
||||
};
|
||||
|
||||
#endif // _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|
||||
|
||||
// custom detour macros
|
||||
#define DETOUR_DECL_MEMBER9(name, ret, p1type, p1name, p2type, p2name, p3type, p3name, p4type, p4name, p5type, p5name, p6type, p6name, p7type, p7name, p8type, p8name, p9type, p9name) \
|
||||
class name##Class \
|
||||
{ \
|
||||
public: \
|
||||
ret name(p1type p1name, p2type p2name, p3type p3name, p4type p4name, p5type p5name, p6type p6name, p7type p7name, p8type p8name, p9type p9name); \
|
||||
static ret (name##Class::* name##_Actual)(p1type, p2type, p3type, p4type, p5type, p6type, p7type, p8type, p9type); \
|
||||
}; \
|
||||
ret (name##Class::* name##Class::name##_Actual)(p1type, p2type, p3type, p4type, p5type, p6type, p7type, p8type, p9type) = NULL; \
|
||||
ret name##Class::name(p1type p1name, p2type p2name, p3type p3name, p4type p4name, p5type p5name, p6type p6name, p7type p7name, p8type p8name, p9type p9name)
|
||||
|
||||
#define DETOUR_MEMBER_MCALL_CALLBACK(name, classptr) \
|
||||
((name##Class *)classptr->*(&name##Class::name))
|
||||
#define DETOUR_MEMBER_MCALL_ORIGINAL(name, classptr) \
|
||||
((name##Class *)classptr->*(name##Class::name##_Actual))
|
||||
|
Loading…
Reference in New Issue
Block a user