Commit a98300fc authored by Dario Seyb's avatar Dario Seyb

fixed reference

parent 5b464607
{
"resolution": [1280, 720],
"target_fps": 60,
"vsync": false,
"vsync": true,
"fullscreen": false,
"quality": "high",
"ssao": false,
......
......@@ -515,7 +515,7 @@ Entity OrbitalSimulationSystem::addPlanet(Transform::Handle sun, std::string n,
planetTransform->scale = glm::dvec3(solarToWorld(r), solarToWorld(r), solarToWorld(r));
planetTransform->position = pos;
auto& planet = m_settings->getPlanet(planetType);
auto planetData = m_settings->getPlanet(planetType);
planetEntity.assign<Drawable>(defaultGeom, planetMaterials[planetType], 2, m_renderer->getRenderPassId("Main"_sh));
......@@ -532,7 +532,7 @@ Entity OrbitalSimulationSystem::addPlanet(Transform::Handle sun, std::string n,
6360000, 6420000, 8000, 0.76, transmittance, inscattering);
}
if (planet.hasAtmosphere) {
if (planetData.hasAtmosphere) {
atmosphereMat.mainTexture = transmittance;
atmosphereMat.specularSmoothnessTexture = inscattering;
atmosphereMat.emissiveColor = { Rg, Rt, 0, 0 };
......@@ -546,7 +546,7 @@ Entity OrbitalSimulationSystem::addPlanet(Transform::Handle sun, std::string n,
}
if (planet.hasWater) {
if (planetData.hasWater) {
// Add simple water as well
auto water = m_scene->create();
auto waterTransform = water.assign<Transform>();
......@@ -555,7 +555,7 @@ Entity OrbitalSimulationSystem::addPlanet(Transform::Handle sun, std::string n,
waterTransform->scale = planetTransform->scale * 1.0;
}
if (planet.moonCount != 0) {
if (planetData.moonCount != 0) {
// Let's add a moon!
auto moon = m_scene->create();
auto moonTransform = moon.assign<Transform>();
......
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