init convarspoof

This commit is contained in:
nullifiedcat 2016-12-03 14:42:34 +03:00
parent b4b2f8eee7
commit 732e25b01e
2 changed files with 20 additions and 1 deletions

16
uran/src/cvarspoof.h Normal file
View File

@ -0,0 +1,16 @@
/*
* cvarspoof.h
*
* Created on: Dec 3, 2016
* Author: nullifiedcat
*/
#ifndef CVARSPOOF_H_
#define CVARSPOOF_H_
class SpoofedConVar {
public:
SpoofedConVar(const char* name);
};
#endif /* CVARSPOOF_H_ */

View File

@ -127,14 +127,17 @@ void CC_DumpPlayers(const CCommand& args) {
void LockConCommand(const char* name, bool lock) {
ConCommandBase* cmd = interfaces::cvar->FindCommandBase(name);
if (lock) {
// TODO LockConCommand FIX!
cmd->m_nFlags |= FCVAR_CHEAT;
cmd->m_nFlags |= FCVAR_REPLICATED;
} else {
cmd->m_nFlags &= ~FCVAR_CHEAT;
cmd->m_nFlags &= ~FCVAR_REPLICATED;
}
}
void LockConCommands(bool lock) {
LockConCommand("thirdperson", lock);
LockConCommand("sv_cheats", lock);
}
ConCommandBase* teamname = 0;