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() {
this->level = Level(levelXmlPath);
this->level = Level(levelXmlPath, farPlane);
level.getPhysics()->init(geometryPath);
// Don't change this!
ignoredMouseUpdates = 0;

View File

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

View File

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