bullet shoot from middle player
This commit is contained in:
parent
629ac1a90d
commit
1c37a00946
2
bullet.c
2
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);
|
||||
|
|
Loading…
Reference in New Issue