Correctly intializing farPlane variable in Level.

This commit is contained in:
Faerbit 2015-06-03 02:12:00 +02:00
parent 67b44042bd
commit 4ba056c6d9
3 changed files with 4 additions and 3 deletions

View File

@ -22,7 +22,7 @@ void Application::init()
} }
void Application::initLevel() { void Application::initLevel() {
this->level = Level(levelXmlPath); this->level = Level(levelXmlPath, farPlane);
level.getPhysics()->init(geometryPath); level.getPhysics()->init(geometryPath);
// Don't change this! // Don't change this!
ignoredMouseUpdates = 0; ignoredMouseUpdates = 0;

View File

@ -2,11 +2,12 @@
#include "loader.hh" #include "loader.hh"
#include <string> #include <string>
Level::Level(std::string xmlFilePath) { Level::Level(std::string xmlFilePath, float farPlane) {
// default value // default value
skydomeSize = 50.0f; skydomeSize = 50.0f;
physics = Physics(); physics = Physics();
this->xmlFilePath = xmlFilePath; this->xmlFilePath = xmlFilePath;
this->farPlane = farPlane;
} }
Level::Level() { Level::Level() {

View File

@ -26,7 +26,7 @@ class Graphics;
class Level { class Level {
public: public:
Level(std::string xmlFilePath); Level(std::string xmlFilePath, float farPlane);
Level(); Level();
~Level(); ~Level();
void load(); void load();