control fix

This commit is contained in:
onezplpl 2024-07-23 15:13:44 -04:00
parent 646d1c9ed3
commit 0f38b89e1c
No known key found for this signature in database
GPG key ID: 7EC026A136F9EEC3
4 changed files with 15 additions and 7 deletions

4
main.c
View file

@ -80,12 +80,12 @@ static void key_callback(GLFWwindow *window, int key, int scancode, int action,
void mouse_button_callback(GLFWwindow *window, int button, int action,
int mods) {
if (button == GLFW_MOUSE_BUTTON_RIGHT && action == GLFW_PRESS) {
fr = 1;
control_rclick(cx, cy, player.pos, player.inv, slot);
fr = 1;
}
if (button == GLFW_MOUSE_BUTTON_LEFT && action == GLFW_PRESS) {
fr = 1;
control_lclick(cx, cy, player.pos, player.inv);
fr = 1;
}
}