@@ -6420,12 +6420,11 @@ bool CStaticFunctionDefinitions::BindKey(const char* szKey, const char* szHitSta
6420
6420
if (bKey)
6421
6421
{
6422
6422
bool bHitState = true ;
6423
+ // Activate all keys for this command
6424
+ pKeyBinds->SetAllCommandsActive (szResource, true , szCommandName, bHitState, szArguments, true );
6423
6425
// Check if its binded already (dont rebind)
6424
6426
if (pKeyBinds->CommandExists (szKey, szCommandName, true , bHitState, szArguments, szResource, true , true ))
6425
- {
6426
- pKeyBinds->SetCommandActive (szKey, szCommandName, bHitState, szArguments, szResource, true , true );
6427
6427
return true ;
6428
- }
6429
6428
6430
6429
if ((!stricmp (szHitState, " down" ) || !stricmp (szHitState, " both" )) &&
6431
6430
pKeyBinds->AddCommand (szKey, szCommandName, szArguments, bHitState, szResource, true ))
@@ -6435,11 +6434,9 @@ bool CStaticFunctionDefinitions::BindKey(const char* szKey, const char* szHitSta
6435
6434
}
6436
6435
6437
6436
bHitState = false ;
6437
+ pKeyBinds->SetAllCommandsActive (szResource, true , szCommandName, bHitState, szArguments, true );
6438
6438
if (pKeyBinds->CommandExists (szKey, szCommandName, true , bHitState, szArguments, szResource, true , true ))
6439
- {
6440
- pKeyBinds->SetCommandActive (szKey, szCommandName, bHitState, szArguments, szResource, true , true );
6441
6439
return true ;
6442
- }
6443
6440
6444
6441
if ((!stricmp (szHitState, " up" ) || !stricmp (szHitState, " both" )) &&
6445
6442
pKeyBinds->AddCommand (szKey, szCommandName, szArguments, bHitState, szResource, true ))
@@ -6516,12 +6513,14 @@ bool CStaticFunctionDefinitions::UnbindKey(const char* szKey, const char* szHitS
6516
6513
if ((!stricmp (szHitState, " down" ) || !stricmp (szHitState, " both" )) &&
6517
6514
pKeyBinds->SetCommandActive (szKey, szCommandName, bHitState, NULL , szResource, false , true ))
6518
6515
{
6516
+ pKeyBinds->SetAllCommandsActive (szResource, false , szCommandName, bHitState, NULL , true );
6519
6517
bSuccess = true ;
6520
6518
}
6521
6519
bHitState = false ;
6522
6520
if ((!stricmp (szHitState, " up" ) || !stricmp (szHitState, " both" )) &&
6523
6521
pKeyBinds->SetCommandActive (szKey, szCommandName, bHitState, NULL , szResource, false , true ))
6524
6522
{
6523
+ pKeyBinds->SetAllCommandsActive (szResource, false , szCommandName, bHitState, NULL , true );
6525
6524
bSuccess = true ;
6526
6525
}
6527
6526
}
0 commit comments