Allow objects near missile launchers to be culled.

We want the scud to not be culled, but we should still cull things
nearby. Rather than making the scud the center of a 2.5km unculled zone,
just exclude missile objectives from culling.
This commit is contained in:
Dan Albert
2021-05-30 19:29:59 -07:00
parent 2218733da4
commit 417fc3af5b
3 changed files with 18 additions and 45 deletions

View File

@@ -337,22 +337,8 @@ class QLiberationMap(QGraphicsView, LiberationMap):
def display_culling(self, scene: QGraphicsScene) -> None:
"""Draws the culling distance rings on the map"""
culling_points = self.game_model.game.get_culling_points()
culling_zones = self.game_model.game.get_culling_zones()
culling_distance = self.game_model.game.settings.perf_culling_distance
for point in culling_points:
culling_distance_point = Point(point.x + 2500, point.y + 2500)
distance_point = self._transform_point(culling_distance_point)
transformed = self._transform_point(point)
radius = distance_point[0] - transformed[0]
scene.addEllipse(
transformed[0] - radius,
transformed[1] - radius,
2 * radius,
2 * radius,
CONST.COLORS["transparent"],
CONST.COLORS["light_green_transparent"],
)
for zone in culling_zones:
culling_distance_zone = Point(
zone.x + culling_distance * 1000, zone.y + culling_distance * 1000