From c88cf1405b8e4552416b30a243f6b5ee49ad0753 Mon Sep 17 00:00:00 2001 From: suhrke Date: Wed, 5 Jul 2017 22:43:24 -0700 Subject: [PATCH] Fixed truncation of PointLight intensity value --- ReflexToQ3/includes/EntityConverter.cpp | 6 +++--- ReflexToQ3/includes/EntityConverter.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ReflexToQ3/includes/EntityConverter.cpp b/ReflexToQ3/includes/EntityConverter.cpp index c077a15..fca2678 100644 --- a/ReflexToQ3/includes/EntityConverter.cpp +++ b/ReflexToQ3/includes/EntityConverter.cpp @@ -29,7 +29,7 @@ * PUBLIC *-----------------------------------------------------------------------------*/ -EntityConverter::EntityConverter(const std::string &entityMapFile) : OFFSET_PLAYER(32.0), OFFSET_PICKUP(2.0), BRIGHTNESS_ADJUST(50) +EntityConverter::EntityConverter(const std::string &entityMapFile) : OFFSET_PLAYER(32.0), OFFSET_PICKUP(2.0), BRIGHTNESS_ADJUST(50.0) { //MUST RUN extractMapInfo method after this constructor haveMapInfo_ = false; @@ -45,7 +45,7 @@ EntityConverter::EntityConverter(const std::string &entityMapFile) : OFFSET_PLAY -EntityConverter::EntityConverter(const std::string &entityMapFile, const std::string &reflexMapFile) : OFFSET_PLAYER(32.0), OFFSET_PICKUP(2.0), BRIGHTNESS_ADJUST(50) +EntityConverter::EntityConverter(const std::string &entityMapFile, const std::string &reflexMapFile) : OFFSET_PLAYER(32.0), OFFSET_PICKUP(2.0), BRIGHTNESS_ADJUST(50.0) { haveMapInfo_ = false; // game modes default to enabled @@ -701,7 +701,7 @@ EntityConverter::adjustBrightness(const std::string &value) const std::stringstream ss(value); ss >> inputBright; - return static_cast(inputBright) * BRIGHTNESS_ADJUST; + return static_cast(inputBright * BRIGHTNESS_ADJUST); } diff --git a/ReflexToQ3/includes/EntityConverter.hpp b/ReflexToQ3/includes/EntityConverter.hpp index adcd8a7..f817bc9 100644 --- a/ReflexToQ3/includes/EntityConverter.hpp +++ b/ReflexToQ3/includes/EntityConverter.hpp @@ -136,7 +136,7 @@ class EntityConverter const float OFFSET_PLAYER; const float OFFSET_PICKUP; // Brightness adjustment factor - const int BRIGHTNESS_ADJUST; + const float BRIGHTNESS_ADJUST;