mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 01:48:08 +01:00
fix: Fixed a bug preventing auto shoot
This commit is contained in:
parent
784962c79d
commit
c339bb7334
1 changed files with 2 additions and 2 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/17 14:14:30 by kcolin #+# #+# */
|
||||
/* Updated: 2025/09/17 12:51:34 by tchampio ### ########.fr */
|
||||
/* Updated: 2025/09/17 13:36:22 by tchampio ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ void handle_shooting(t_cub3d_data *data)
|
|||
data->keypresses.is_space_pressed = false;
|
||||
if (data->player.weapon.clip <= 0)
|
||||
return ;
|
||||
if (data->player.weapon.is_auto)
|
||||
if (data->last_since_shoot != 0 && data->player.weapon.is_auto)
|
||||
{
|
||||
if (get_milliseconds() - data->last_since_shoot < 50000)
|
||||
return ;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue