From 59be4aaf1a60e5347fa5d008f17b074c4bad1a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 12 Feb 2025 01:55:02 +0100 Subject: [PATCH] Unify the lights display logic between ENC ad IMG --- src/map/ENC/rastertile.cpp | 2 +- src/map/IMG/lights.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/map/ENC/rastertile.cpp b/src/map/ENC/rastertile.cpp index 91bccd5f..1f4b9a25 100644 --- a/src/map/ENC/rastertile.cpp +++ b/src/map/ENC/rastertile.cpp @@ -277,7 +277,7 @@ void RasterTile::processPoints(QList &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())); diff --git a/src/map/IMG/lights.h b/src/map/IMG/lights.h index c722f73e..c1265801 100644 --- a/src/map/IMG/lights.h +++ b/src/map/IMG/lights.h @@ -23,7 +23,8 @@ public: }; 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;