Fixed truncation of PointLight intensity value
This commit is contained in:
parent
e622f495a9
commit
c88cf1405b
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user