Fix bindings
This commit is contained in:
parent
27a73b6955
commit
2019cb257f
@ -15,7 +15,7 @@ namespace binding
|
||||
|
||||
int get_num_keys()
|
||||
{
|
||||
return 109;
|
||||
return 110;
|
||||
}
|
||||
|
||||
int key_write_bindings_to_buffer_stub(int /*localClientNum*/, char* buffer, const int buffer_size)
|
||||
@ -83,7 +83,7 @@ namespace binding
|
||||
int key_get_binding_for_cmd_stub(const char* command)
|
||||
{
|
||||
// original binds
|
||||
for (auto i = 0; i <= get_num_keys(); i++)
|
||||
for (auto i = 0; i < get_num_keys(); i++)
|
||||
{
|
||||
if (game::command_whitelist[i] && !strcmp(command, game::command_whitelist[i]))
|
||||
{
|
||||
@ -124,10 +124,10 @@ namespace binding
|
||||
}
|
||||
|
||||
// write all bindings to config file
|
||||
utils::hook::jump(SELECT_VALUE(0x1AC980_b, 0x199ED0_b), key_write_bindings_to_buffer_stub, true);
|
||||
utils::hook::jump(SELECT_VALUE(0x1AC980_b, 0x199ED0_b), key_write_bindings_to_buffer_stub);
|
||||
|
||||
// links a custom command to an index
|
||||
utils::hook::jump(SELECT_VALUE(0x377280_b, 0x1572B0_b), key_get_binding_for_cmd_stub, true);
|
||||
utils::hook::jump(SELECT_VALUE(0x377280_b, 0x1572B0_b), key_get_binding_for_cmd_stub);
|
||||
|
||||
// execute custom binds
|
||||
cl_execute_key_hook.create(SELECT_VALUE(0x1A8350_b, 0x130610_b), &cl_execute_key_stub);
|
||||
|
Loading…
Reference in New Issue
Block a user