Don't spawn small asteroids

This commit is contained in:
Camden Dixie O'Brien
2025-10-15 14:45:08 +01:00
parent 2a55eb17ad
commit 0c510b88d0

10
game.c
View File

@@ -2,14 +2,14 @@
#include "input.h" #include "input.h"
#include "renderer.h" #include "renderer.h"
#include "text.h"
#include "rng.h" #include "rng.h"
#include "text.h"
#include <assert.h> #include <assert.h>
#include <linux/input-event-codes.h> #include <linux/input-event-codes.h>
#include <math.h> #include <math.h>
#include <string.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#define SHIP_COLLIDE_R 0.05 #define SHIP_COLLIDE_R 0.05
#define SHIP_MASS 0.5 #define SHIP_MASS 0.5
@@ -224,11 +224,9 @@ static void spawn_asteroid()
{ {
float r; float r;
const float rnd = rng_canon(); const float rnd = rng_canon();
if (rnd < 0.1) if (rnd < 0.4)
r = ASTEROID_SMALL;
else if (rnd < 0.5)
r = ASTEROID_MEDIUM; r = ASTEROID_MEDIUM;
else if (rnd < 0.9) else if (rnd < 0.8)
r = ASTEROID_LARGE; r = ASTEROID_LARGE;
else else
r = ASTEROID_HUGE; r = ASTEROID_HUGE;