mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 12:06:07 +08:00
Fix ConVarHandle/ConCommandHandle size handleand ConCommandHandle INVALID val
This commit is contained in:

committed by
Nicholas Hastings

parent
5dd1b962bb
commit
d25d1cbe55
@ -528,9 +528,29 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
template< class DummyType >
|
||||
class CIntHandle64 : public CBaseIntHandle< uint64 >
|
||||
{
|
||||
public:
|
||||
inline CIntHandle64() {}
|
||||
|
||||
static inline CIntHandle64<DummyType> MakeHandle(HANDLE_TYPE val)
|
||||
{
|
||||
return CIntHandle64<DummyType>(val);
|
||||
}
|
||||
|
||||
protected:
|
||||
inline CIntHandle64(HANDLE_TYPE val)
|
||||
{
|
||||
m_Handle = val;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// NOTE: This macro is the same as windows uses; so don't change the guts of it
|
||||
#define DECLARE_HANDLE_16BIT(name) typedef CIntHandle16< struct name##__handle * > name;
|
||||
#define DECLARE_HANDLE_32BIT(name) typedef CIntHandle32< struct name##__handle * > name;
|
||||
#define DECLARE_HANDLE_64BIT(name) typedef CIntHandle64< struct name##__handle * > name;
|
||||
|
||||
#define DECLARE_POINTER_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
|
||||
#define FORWARD_DECLARE_HANDLE(name) typedef struct name##__ *name
|
||||
|
@ -54,11 +54,11 @@ union CVValue_t;
|
||||
//-----------------------------------------------------------------------------
|
||||
//#define CONVAR_TEST_MATERIAL_THREAD_CONVARS 1
|
||||
|
||||
DECLARE_HANDLE_32BIT(ConVarHandle);
|
||||
DECLARE_HANDLE_64BIT(ConVarHandle);
|
||||
#define CONVAR_ID_INVALID ConVarHandle::MakeHandle( 0xFFFFFFFF )
|
||||
|
||||
DECLARE_HANDLE_32BIT(ConCommandHandle);
|
||||
#define CONCOMMAND_ID_INVALID ConCommandHandle::MakeHandle( 0xFFFFFFFF )
|
||||
DECLARE_HANDLE_64BIT(ConCommandHandle);
|
||||
#define CONCOMMAND_ID_INVALID ConCommandHandle::MakeHandle( 0xFFFF )
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ConVar flags
|
||||
|
Reference in New Issue
Block a user