Add support for listening to, blocking, changing, and faking ClientCommandKeyValues.

This commit is contained in:
Nicholas Hastings
2015-07-12 13:14:46 -04:00
parent 705b5d3f5f
commit c85cc5cbf7
7 changed files with 239 additions and 11 deletions
+12 -1
View File
@@ -2,7 +2,7 @@
* vim: set ts=4 :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
* Copyright (C) 2004-2015 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
@@ -181,6 +181,10 @@ public:
void OnClientDisconnect_Post(edict_t *pEntity);
#if SOURCE_ENGINE >= SE_ORANGEBOX
void OnClientCommand(edict_t *pEntity, const CCommand &args);
#if SOURCE_ENGINE >= SE_EYE && SOURCE_ENGINE != SE_DOTA
void OnClientCommandKeyValues(edict_t *pEntity, KeyValues *pCommand);
void OnClientCommandKeyValues_Post(edict_t *pEntity, KeyValues *pCommand);
#endif
#else
void OnClientCommand(edict_t *pEntity);
#endif
@@ -224,6 +228,10 @@ public:
unsigned int GetReplyTo();
unsigned int SetReplyTo(unsigned int reply);
void MaxPlayersChanged(int newvalue = -1);
inline bool InClientCommandKeyValuesHook()
{
return m_bInCCKVHook;
}
#if SOURCE_ENGINE == SE_CSGO
bool HandleConVarQuery(QueryCvarCookie_t cookie, edict_t *pPlayer, EQueryCvarValueStatus result, const char *cvarName, const char *cvarValue);
#endif
@@ -242,6 +250,8 @@ private:
IForward *m_cldisconnect_post;
IForward *m_clputinserver;
IForward *m_clcommand;
IForward *m_clcommandkv;
IForward *m_clcommandkv_post;
IForward *m_clinfochanged;
IForward *m_clauth;
IForward *m_onActivate;
@@ -262,6 +272,7 @@ private:
bool m_bIsReplayActive;
int m_SourceTVUserId;
int m_ReplayUserId;
bool m_bInCCKVHook;
};
#if SOURCE_ENGINE == SE_DOTA