implement sensor range requirements
This commit is contained in:
@@ -804,23 +804,7 @@ void GameWorldView::drawDebugSensorRanges(QPainter& painter)
|
||||
m_visuals->ships.find(role);
|
||||
if (it == m_visuals->ships.end()) { continue; }
|
||||
|
||||
float range = 0.0f;
|
||||
if (ship.weapon.has_value())
|
||||
{
|
||||
range = ship.weapon->range;
|
||||
}
|
||||
else if (ship.repairTool.has_value())
|
||||
{
|
||||
range = ship.repairTool->range;
|
||||
}
|
||||
else if (ship.cargo.has_value())
|
||||
{
|
||||
range = ship.cargo->collectionRange * 5.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
const float range = ship.sensorRange;
|
||||
|
||||
const QPointF center = worldToWidget(ship.position);
|
||||
const qreal radiusPx = static_cast<qreal>(range)
|
||||
|
||||
Reference in New Issue
Block a user