From bbb631f63338ca203b632747b73b5fca6f995c02 Mon Sep 17 00:00:00 2001 From: nemo Date: Mon, 30 Sep 2024 14:38:23 +0200 Subject: [PATCH] speed bullet var --- bullet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bullet.c b/bullet.c index 33886ee..b8aeb19 100644 --- a/bullet.c +++ b/bullet.c @@ -42,9 +42,10 @@ void draw_bullets(Camera2D *cam) if (bullets[i].time <= EPSILON) continue; + float speed = 50; float angle = bullets[i].angle * PI/180; Vector2 toward = Vector2Normalize((Vector2) {cos(angle), sin(angle)}); - bullets[i].pos = Vector2Add(bullets[i].pos, Vector2Scale(toward, 50)); + bullets[i].pos = Vector2Add(bullets[i].pos, Vector2Scale(toward, speed)); bullets[i].time -= GetFrameTime(); DrawTexture(textures[bullets[i].type], bullets[i].pos.x, bullets[i].pos.y, WHITE); }