Disable light-level code as it's not used currently.

This commit is contained in:
Dmitry 2019-05-10 01:40:33 +03:00 committed by jeefo
commit 117db06048
3 changed files with 8 additions and 3 deletions

View file

@ -370,7 +370,7 @@ public:
red = green = blue = 0; red = green = blue = 0;
} }
inline const int avg (void) const { inline int avg (void) const {
return (red + green + blue) / (sizeof (SimpleColor) / sizeof (int)); return (red + green + blue) / (sizeof (SimpleColor) / sizeof (int));
} }
}; };

View file

@ -407,7 +407,7 @@ private:
model_t *m_worldModel; model_t *m_worldModel;
public: public:
LightMeasure (void) : m_worldModel (nullptr), m_doAnimation (false) { LightMeasure (void) : m_doAnimation (false), m_worldModel (nullptr) {
initializeLightstyles (); initializeLightstyles ();
m_point.reset (); m_point.reset ();
} }

View file

@ -1370,17 +1370,22 @@ void Waypoint::initVisibility (void) {
void Waypoint::initLightLevels (void) { void Waypoint::initLightLevels (void) {
// this function get's the light level for each waypoin on the map // this function get's the light level for each waypoin on the map
// @todo: re-enable when working on flashlights
illum.enableAnimation (false);
return;
#if 0
// no waypoints ? no light levels, and only one-time init // no waypoints ? no light levels, and only one-time init
if (!m_numWaypoints || !cr::fzero (m_waypointLightLevel[0])) { if (!m_numWaypoints || !cr::fzero (m_waypointLightLevel[0])) {
return; return;
} }
engine.print ("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1");
// update light levels for all waypoints // update light levels for all waypoints
for (int i = 0; i < m_numWaypoints; i++) { for (int i = 0; i < m_numWaypoints; i++) {
m_waypointLightLevel[i] = illum.getLightLevel (m_paths[i]->origin); m_waypointLightLevel[i] = illum.getLightLevel (m_paths[i]->origin);
} }
// disable lightstyle animations on finish (will be auto-enabled on mapchange) // disable lightstyle animations on finish (will be auto-enabled on mapchange)
illum.enableAnimation (false); illum.enableAnimation (false);
#endif
} }
void Waypoint::initTypes (void) { void Waypoint::initTypes (void) {