1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-23 01:59:43 +08:00
hl2sdk/cl_dll/cdll_convar.h

47 lines
995 B
C++

//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $Workfile: $
// $Date: $
//
//-----------------------------------------------------------------------------
// $Log: $
//
// $NoKeywords: $
//=============================================================================//
#ifndef CDLL_CONVAR_H
#define CDLL_CONVAR_H
#pragma once
// This file implements IConVarAccessor to allow access to console variables.
#include "convar.h"
#include "cdll_util.h"
#include "icvar.h"
class CDLL_ConVarAccessor : public IConCommandBaseAccessor
{
public:
virtual bool RegisterConCommandBase( ConCommandBase *pCommand )
{
// Mark for easy removal
pCommand->AddFlags( FCVAR_CLIENTDLL );
// Unlink from client .dll only list
pCommand->SetNext( 0 );
// Link to engine's list instead
cvar->RegisterConCommandBase( pCommand );
return true;
}
};
#endif // CDLL_CONVAR_H