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

This commit is contained in:
Rtch90 2017-11-23 23:33:44 +00:00
parent e5ef17814a
commit 0d79a17c31
3 changed files with 8 additions and 8 deletions

View File

@ -193,7 +193,7 @@ void L3D::MainLoop(void) {
HyperspaceTo(&s);
/* 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->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;
StarSystem::BodyType type = s.m_systems[system_idx].primaryStarClass;
primary->type = type;
primary->type = type;
primary->parent = NULL;
primary->radius = SOL_RADIUS*bodyTypeInfo[type].radius;
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;
(*i)->name = primary->name+buf;
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;
/* Surface temperature. */
@ -319,7 +319,7 @@ void StarSystem::SBody::L3DckPlanetType(SBody* star, double distToPrimary, MTRan
globalwarming = CLAMP(globalwarming, 0, 0.95);
//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. */
double bbody_temp;
bool fiddle = false;
@ -434,7 +434,7 @@ void StarSystem::SBody::L3DckPlanetType(SBody* star, double distToPrimary, MTRan
buf[0] = '1'+(idx++);
buf[1] = 0;
(*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 {
~SBody(void);
void EliminateBadChildren(void); /* :D */
void L3DckPlanetType(SBody*, double distToPrimary, MTRand& drand, bool genMoons);
void PickPlanetType(SBody*, double distToPrimary, MTRand& drand, bool genMoons);
SBody* parent;
std::vector<SBody*> children;
@ -92,7 +92,7 @@ public:
double mass;
double radMin, radMax;
double averageTemp;
BodySuperType supertype;
BodyType type;
};