diff options
Diffstat (limited to 'src/menu.cpp')
| -rw-r--r-- | src/menu.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/menu.cpp b/src/menu.cpp index d628873..9537e05 100644 --- a/src/menu.cpp +++ b/src/menu.cpp | |||
| @@ -503,17 +503,10 @@ static void menu_handle_input() { | |||
| 503 | g_bind_mode = false; | 503 | g_bind_mode = false; |
| 504 | return; // cancel, keep old bind | 504 | return; // cancel, keep old bind |
| 505 | } | 505 | } |
| 506 | // any other key = new bind | 506 | // any other key = new bind (features may share the same bind) |
| 507 | MenuNode *n = g_visible[g_selected]; | 507 | MenuNode *n = g_visible[g_selected]; |
| 508 | if (n->bind_ptr) { | 508 | if (n->bind_ptr) |
| 509 | // clear same bind from other features | ||
| 510 | FeatureState *features[] = {&g_bhop, &g_abh, &g_aimbot, &g_triggerbot, | ||
| 511 | &g_silentaim}; | ||
| 512 | for (auto *f : features) | ||
| 513 | if (&f->bind != n->bind_ptr && f->bind == i) | ||
| 514 | f->bind = 0; | ||
| 515 | *n->bind_ptr = i; | 509 | *n->bind_ptr = i; |
| 516 | } | ||
| 517 | g_bind_mode = false; | 510 | g_bind_mode = false; |
| 518 | config_save(); | 511 | config_save(); |
| 519 | rebuild_visible(); | 512 | rebuild_visible(); |
