mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 20:16:10 +08:00
Fix late-registered ConCommands not saving handle
This commit is contained in:

committed by
Nicholas Hastings

parent
e145eae33e
commit
311c966f97
@ -52,12 +52,14 @@ public:
|
|||||||
{
|
{
|
||||||
if ( s_bConCommandsRegistered )
|
if ( s_bConCommandsRegistered )
|
||||||
{
|
{
|
||||||
g_pCVar->RegisterConCommand( pCmd, s_nCVarFlag );
|
ConCommandHandle hndl = g_pCVar->RegisterConCommand( pCmd, s_nCVarFlag );
|
||||||
if ( !pCmd->GetRef()->handle.IsValid() )
|
if ( !hndl.IsValid() )
|
||||||
{
|
{
|
||||||
Plat_FatalErrorFunc( "RegisterConCommand: Unknown error registering con command \"%s\"!\n", pCmd->GetName() );
|
Plat_FatalErrorFunc( "RegisterConCommand: Unknown error registering con command \"%s\"!\n", pCmd->GetName() );
|
||||||
DebuggerBreakIfDebugging();
|
DebuggerBreakIfDebugging();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pCmd->SetHandle( hndl );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user