Merge pull request #58 from JohanAberg/patch-1

ValueError: negative radius
This commit is contained in:
Vasyl Horbachenko 2019-05-21 04:50:30 +03:00 committed by GitHub
commit 4c5a2650d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -320,7 +320,7 @@ class OverviewCanvas:
for cp in self.game.theater.controlpoints: for cp in self.game.theater.controlpoints:
coords = self._transform_point(cp.position) coords = self._transform_point(cp.position)
radius = 12 * math.pow(cp.importance, 1) radius = 12 * math.pow(cp.importance, 1)
radius_m = radius * cp.base.strength - 2 radius_m = max(radius * cp.base.strength - 2, 0)
if cp.captured: if cp.captured:
color = self._player_color() color = self._player_color()