From 4ba056c6d9948c546d5991a621817d58e3f660f8 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Wed, 3 Jun 2015 02:12:00 +0200 Subject: [PATCH] Correctly intializing farPlane variable in Level. --- game/application.cc | 2 +- game/level.cc | 3 ++- game/level.hh | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/game/application.cc b/game/application.cc index 1043081..18fa327 100644 --- a/game/application.cc +++ b/game/application.cc @@ -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; diff --git a/game/level.cc b/game/level.cc index 1b6d319..858822a 100644 --- a/game/level.cc +++ b/game/level.cc @@ -2,11 +2,12 @@ #include "loader.hh" #include -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() { diff --git a/game/level.hh b/game/level.hh index a06e20b..9c79144 100644 --- a/game/level.hh +++ b/game/level.hh @@ -26,7 +26,7 @@ class Graphics; class Level { public: - Level(std::string xmlFilePath); + Level(std::string xmlFilePath, float farPlane); Level(); ~Level(); void load();