Skip to content

Commit

Permalink
Fix chat noclip
Browse files Browse the repository at this point in the history
Closes #8
  • Loading branch information
utf-4096 committed Jan 12, 2023
1 parent 8381776 commit 2dd7511
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cameracontroller.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void cameracontroller_fps(float dt) {
}

if(chat_input_mode != CHAT_NO_INPUT) {
players[local_player_id].input.keys.packed = 0;
players[local_player_id].input.keys.packed &= 0b00100000;
players[local_player_id].input.buttons.packed = 0;
}

Expand Down
6 changes: 3 additions & 3 deletions src/hud.c
Original file line number Diff line number Diff line change
Expand Up @@ -1782,7 +1782,7 @@ static void hud_ingame_keyboard(int key, int action, int mods, int internal) {
} else if(key == WINDOW_KEY_YES) {
if(show_exit) {
hud_change(&hud_serverlist);
} else {
} else if(!window_key_down(WINDOW_KEY_CROUCH)) {
window_textinput(1);
chat_input_mode = CHAT_TEAM_INPUT;
}
Expand Down Expand Up @@ -1812,13 +1812,13 @@ static void hud_ingame_keyboard(int key, int action, int mods, int internal) {
chat_add(0, 0x00FFFF, volstr);
}

if(key == WINDOW_KEY_COMMAND) {
if(key == WINDOW_KEY_COMMAND && !window_key_down(WINDOW_KEY_CROUCH)) {
window_textinput(1);
chat_input_mode = CHAT_ALL_INPUT;
strcpy(chat[0][0], "/");
}

if(key == WINDOW_KEY_CHAT) {
if(key == WINDOW_KEY_CHAT && !window_key_down(WINDOW_KEY_CROUCH)) {
window_textinput(1);
chat_input_mode = CHAT_ALL_INPUT;
}
Expand Down

0 comments on commit 2dd7511

Please sign in to comment.