1 parent c6b6a2b commit 88f7151Copy full SHA for 88f7151
1 file changed
src/game/systems/projectile-system.hpp
@@ -109,7 +109,9 @@ namespace gameplay {
109
if (!weapon || !playerComp) return false;
110
if (weapon->timer > 0.0f) return false; // still in cooldown / already reloading
111
112
- bool wantsReload = app->getKeyboard().justPressed(GLFW_KEY_R) && weapon->currentAmmo < weapon->magSize;
+ bool wantsReload =
113
+ (app->getKeyboard().justPressed(GLFW_KEY_R) || app->getJoystick().justPressed(GLFW_GAMEPAD_BUTTON_Y)) &&
114
+ weapon->currentAmmo < weapon->magSize;
115
bool needsAutoReload = weapon->currentAmmo <= 0;
116
117
if ((wantsReload || needsAutoReload) && weapon->maxAmmo > 0) {
0 commit comments