Skip to content

Commit

Permalink
Unify the lights display logic between ENC ad IMG
Browse files Browse the repository at this point in the history
  • Loading branch information
tumic0 committed Feb 12, 2025
1 parent 398ef2c commit 59be4aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/map/ENC/rastertile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ void RasterTile::processPoints(QList<MapData::Point> &points,
double range = attr.value(VALNMR).toDouble();

if (attr.contains(SECTR1)
|| (range >= 6 && !(point.type() & 0xFFFF))) {
|| (range > 6 && !(point.type() & 0xFFFF))) {
sectorLights.append(SectorLight(point.pos(), color,
attr.value(LITVIS).toUInt(), range,
attr.value(SECTR1).toDouble(), attr.value(SECTR2).toDouble()));
Expand Down
3 changes: 2 additions & 1 deletion src/map/IMG/lights.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ class Lights
};

Lights() : color(None), range(0) {}
bool isSectorLight() const {return ((color && range) || !sectors.isEmpty());}
bool isSectorLight() const
{return ((color && range > 6) || !sectors.isEmpty());}

Color color;
quint32 range;
Expand Down

0 comments on commit 59be4aa

Please sign in to comment.