diff --git a/src/font.h b/src/font.h index 43c76ab..8f6cecc 100644 --- a/src/font.h +++ b/src/font.h @@ -1,7 +1,11 @@ #pragma once #include "opengl.h" -/* Font info. */ +/** + * struct glFont + * + * @brief Represents a font in memory. + */ typedef struct glFont_ { int h; /* Height. */ int* w; diff --git a/src/space.c b/src/space.c index e64acd7..7b5296d 100644 --- a/src/space.c +++ b/src/space.c @@ -419,9 +419,15 @@ static void space_addFleet(Fleet* fleet, int init) { /* Needed to determine angle. */ vectnull(&vn); - /* c will determin how to create the fleet. */ - if(init == 1) - c = RNG(0, 1); + /* c will determine how to create the fleet, only non-zero if it's run in init. */ + if(init == 1) { + if(RNGF() < 0.5) /* 50% chance of starting out en route. */ + c = 2; + else if(RNGF() < 0.5) /* 25% chance of starting out landed. */ + c = 1; + else /* 25% chance starting out entering hyperspace. */ + c = 0; + } else c = 0; /* Simulate they came from hyperspace. */ @@ -430,8 +436,8 @@ static void space_addFleet(Fleet* fleet, int init) { RNG(0,360)*M_PI/180.); } - /* Starting out landed. */ - else if(c == 1) { + /* Starting out landed or heading towards landing. */ + else if((c == 1) || (c == 2)) { /* Get friendly planet to land on. */ planet = NULL; for(i = 0; i < cur_system->nplanets; i++)