mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-01-04 00:23:25 +08:00
Fix late-registered ConCommands not saving handle
This commit is contained in:
parent
e145eae33e
commit
311c966f97
@ -52,12 +52,14 @@ public:
|
||||
{
|
||||
if ( s_bConCommandsRegistered )
|
||||
{
|
||||
g_pCVar->RegisterConCommand( pCmd, s_nCVarFlag );
|
||||
if ( !pCmd->GetRef()->handle.IsValid() )
|
||||
ConCommandHandle hndl = g_pCVar->RegisterConCommand( pCmd, s_nCVarFlag );
|
||||
if ( !hndl.IsValid() )
|
||||
{
|
||||
Plat_FatalErrorFunc( "RegisterConCommand: Unknown error registering con command \"%s\"!\n", pCmd->GetName() );
|
||||
DebuggerBreakIfDebugging();
|
||||
}
|
||||
|
||||
pCmd->SetHandle( hndl );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user