[Fix] Forgot to commit a couple of minor fixes.

This commit is contained in:
Allanis 2017-11-23 23:33:44 +00:00
parent 1550893bcf
commit d24a93345a
3 changed files with 8 additions and 8 deletions

View File

@ -193,7 +193,7 @@ void L3D::MainLoop(void) {
HyperspaceTo(&s); HyperspaceTo(&s);
/* Linked list eh... Put player at planet f. */ /* Linked list eh... Put player at planet f. */
Frame* pframe = *++(++(++(++(Space::rootFrame->m_children.begin())))); Frame* pframe = *(++(++(++(++(Space::rootFrame->m_children.begin())))));
player->SetFrame(pframe); player->SetFrame(pframe);
player->SetPosition(vector3d(0, 100000, 10000000.0)); player->SetPosition(vector3d(0, 100000, 10000000.0));

View File

@ -248,7 +248,7 @@ StarSystem::StarSystem(int sector_x, int sector_y, int system_idx) {
SBody* primary = new SBody; SBody* primary = new SBody;
StarSystem::BodyType type = s.m_systems[system_idx].primaryStarClass; StarSystem::BodyType type = s.m_systems[system_idx].primaryStarClass;
primary->type = type; primary->type = type;
primary->parent = NULL; primary->parent = NULL;
primary->radius = SOL_RADIUS*bodyTypeInfo[type].radius; primary->radius = SOL_RADIUS*bodyTypeInfo[type].radius;
primary->mass = SOL_MASS*bodyTypeInfo[type].mass; primary->mass = SOL_MASS*bodyTypeInfo[type].mass;
@ -300,11 +300,11 @@ StarSystem::StarSystem(int sector_x, int sector_y, int system_idx) {
buf[2] = 0; buf[2] = 0;
(*i)->name = primary->name+buf; (*i)->name = primary->name+buf;
double d = 0.5*((*i)->radMin + (*i)->radMax); double d = 0.5*((*i)->radMin + (*i)->radMax);
(*i)->L3DckPlanetType(primary, d, rand, true); (*i)->PickPlanetType(primary, d, rand, true);
} }
} }
void StarSystem::SBody::L3DckPlanetType(SBody* star, double distToPrimary, MTRand& rand, bool genMoons) { void StarSystem::SBody::PickPlanetType(SBody* star, double distToPrimary, MTRand& rand, bool genMoons) {
float emass = mass / EARTH_MASS; float emass = mass / EARTH_MASS;
/* Surface temperature. */ /* Surface temperature. */
@ -319,7 +319,7 @@ void StarSystem::SBody::L3DckPlanetType(SBody* star, double distToPrimary, MTRan
globalwarming = CLAMP(globalwarming, 0, 0.95); globalwarming = CLAMP(globalwarming, 0, 0.95);
//printf("====\ndist %f, mass %f, albedo %f, globalwarming %f\n", d, emass, albedo, globalwarming); //printf("====\ndist %f, mass %f, albedo %f, globalwarming %f\n", d, emass, albedo, globalwarming);
/* This is all of course a total joke and un-physical.. Sorry. */ /* This is all of course a total joke and un-physical.. Sorry. */
double bbody_temp; double bbody_temp;
bool fiddle = false; bool fiddle = false;
@ -434,7 +434,7 @@ void StarSystem::SBody::L3DckPlanetType(SBody* star, double distToPrimary, MTRan
buf[0] = '1'+(idx++); buf[0] = '1'+(idx++);
buf[1] = 0; buf[1] = 0;
(*i)->name = name+buf; (*i)->name = name+buf;
(*i)->L3DckPlanetType(star, d, rand, false); (*i)->PickPlanetType(star, d, rand, false);
} }
} }
} }

View File

@ -77,7 +77,7 @@ public:
struct SBody { struct SBody {
~SBody(void); ~SBody(void);
void EliminateBadChildren(void); /* :D */ void EliminateBadChildren(void); /* :D */
void L3DckPlanetType(SBody*, double distToPrimary, MTRand& drand, bool genMoons); void PickPlanetType(SBody*, double distToPrimary, MTRand& drand, bool genMoons);
SBody* parent; SBody* parent;
std::vector<SBody*> children; std::vector<SBody*> children;
@ -92,7 +92,7 @@ public:
double mass; double mass;
double radMin, radMax; double radMin, radMax;
double averageTemp; double averageTemp;
BodySuperType supertype; BodySuperType supertype;
BodyType type; BodyType type;
}; };