diff --git a/data/levels/Compositions.xml b/data/levels/Compositions.xml index e328779..9203b8f 100644 --- a/data/levels/Compositions.xml +++ b/data/levels/Compositions.xml @@ -75,6 +75,7 @@ 1.0 1.0 4.0 + 0.5 diff --git a/loader.cc b/loader.cc index 4f3cee2..0c091e1 100644 --- a/loader.cc +++ b/loader.cc @@ -374,6 +374,14 @@ void Loader::load(std::string filePath, Level* level, std::string compositionsPa glm::vec3 lightPosition = compPos + glm::vec3(rotatedLightOffset.x,rotatedLightOffset.y,rotatedLightOffset.z); Light light = Light(lightPosition, lightColour, lightIntensity); level->addLight(light); + XMLElement* flameOffset = NULL; + flameOffset = xmlLight->FirstChildElement("flameOffset"); + if (flameOffset != NULL){ + float offset = 0; + errorCheck(flameOffset->QueryFloatText(&offset)); + Flame flame = Flame(offset, lightPosition, glm::vec3(0,0,0)); + level->addFlame(flame); + } }//iterating over all lights of the composition }//corect composition found }//iterating over all compositions in Compositions.xml