Commit bbc931e9 authored by Dario Seyb's avatar Dario Seyb
parents 66d7da0a c952dd04
Pipeline #1182 skipped
......@@ -29,10 +29,10 @@ float getTessLevel(float d0, float d1){
if(avg >= 2000 * factor){
return 1;
}
if(avg >= 1000 * factor){
if(avg >= 1800 * factor){
return 2;
}
if(avg >= 700 * factor){
if(avg >= 1000 * factor){
return 4;
}
if(avg >= 400 * factor){
......
......@@ -78,25 +78,25 @@ bool SettingsSystem::startup() {
const picojson::object& planetObj = planetVal.get<picojson::object>();
PlanetMetaData planet;
planet.name = planetName;
PlanetMetaData planetData;
planetData.name = planetName;
for (auto& prop : planetObj) {
if (prop.first == "shaders") {
VALIDATE_TYPE(prop, std::string);
planet.shaders = prop.second.get<std::string>();
planetData.shaders = prop.second.get<std::string>();
} else if (prop.first == "atmosphere") {
VALIDATE_TYPE(prop, bool);
planet.hasAtmosphere = prop.second.get<bool>();
planetData.hasAtmosphere = prop.second.get<bool>();
} else if (prop.first == "water") {
VALIDATE_TYPE(prop, bool);
planet.hasWater = prop.second.get<bool>();
planetData.hasWater = prop.second.get<bool>();
} else if (prop.first == "moons") {
VALIDATE_TYPE(prop, int64_t);
planet.moonCount = prop.second.get<int64_t>();
planetData.moonCount = prop.second.get<int64_t>();
}
}
m_availablePlanets.push_back(planet);
m_availablePlanets.push_back(planetData);
}
} else if(i.first == "resolution") {
VALIDATE_TYPE(i, picojson::array);
......@@ -140,4 +140,4 @@ bool SettingsSystem::startup() {
void SettingsSystem::shutdown() {
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment