Fix SAM repair.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2091.
This commit is contained in:
Benjamin Fischer 2022-03-18 08:07:41 +01:00 committed by GitHub
parent be67d6dbc6
commit 31bc5eb2aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,7 +190,7 @@ class QGroundObjectMenu(QDialog):
# Remove destroyed units in the vicinity
destroyed_units = self.game.get_destroyed_units()
for d in destroyed_units:
p = Point(d["x"], d["z"])
p = Point(d["x"], d["z"], self.game.theater.terrain)
if p.distance_to_point(unit.position) < 15:
destroyed_units.remove(d)
logging.info("Removed destroyed units " + str(d))