Don't spawn small asteroids

This commit is contained in:
2025-10-18 17:43:22 +01:00
parent 8cbe1b0431
commit 1f2fd1ce0e

10
game.c
View File

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