From 1c37a00946bf71886261d4fe09a1201913b8daa5 Mon Sep 17 00:00:00 2001 From: nemo <n3m0o7@hotmail.com> Date: Wed, 9 Oct 2024 14:41:27 +0200 Subject: [PATCH] bullet shoot from middle player --- bullet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bullet.c b/bullet.c index 645394d..b07bb1a 100644 --- a/bullet.c +++ b/bullet.c @@ -51,7 +51,7 @@ void draw_bullets() Texture t = textures[bullets[i].type]; Rectangle source = {0, 0, t.width, t.height}; - Rectangle dest = {bullets[i].pos.x, bullets[i].pos.y, t.width, t.height}; + Rectangle dest = {bullets[i].pos.x + t.width/2, bullets[i].pos.y + t.height/2, t.width, t.height}; Vector2 origin = {t.width/2, t.height/2}; DrawTexturePro(t, source, dest, origin, bullets[i].angle + 90, WHITE);