dev: allocated weapon on the heap

This commit is contained in:
Theo Champion 2025-09-17 16:59:32 +02:00
parent 0b00f5608c
commit 4048f5d1e3
8 changed files with 68 additions and 45 deletions

View file

@ -6,7 +6,7 @@
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/08/18 13:05:31 by kcolin #+# #+# */
/* Updated: 2025/09/16 16:08:40 by tchampio ### ########.fr */
/* Updated: 2025/09/17 16:54:35 by tchampio ### ########.fr */
/* */
/* ************************************************************************** */
@ -79,6 +79,6 @@ void destroy_hud_textures(t_cub3d_data *data)
i = 0;
while (i < 3)
destroy_texture(data, data->perk_logos[i++]);
destroy_texture(data, data->player.weapon.texture);
destroy_texture(data, data->player.weapon.shoot_texture);
destroy_texture(data, data->player.weapon->texture);
destroy_texture(data, data->player.weapon->shoot_texture);
}