Fixed truncation of PointLight intensity value

This commit is contained in:
suhrke 2017-07-05 22:43:24 -07:00
parent e622f495a9
commit c88cf1405b
2 changed files with 4 additions and 4 deletions

View File

@ -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<int>(inputBright) * BRIGHTNESS_ADJUST;
return static_cast<int>(inputBright * BRIGHTNESS_ADJUST);
}

View File

@ -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;