Don't spawn small asteroids
This commit is contained in:
10
game.c
10
game.c
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user