mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix: map icons now match player side color (red or blue)
This commit is contained in:
parent
0ff3ce98e0
commit
04e77a97f2
@ -42,6 +42,13 @@ class QMapGroundObject(QGraphicsRectItem):
|
||||
|
||||
def paint(self, painter, option, widget=None):
|
||||
#super(QMapControlPoint, self).paint(painter, option, widget)
|
||||
if self.parent.game.player_country in db.BLUEFOR_FACTIONS:
|
||||
playerIcons = "_blue"
|
||||
enemyIcons = ""
|
||||
else:
|
||||
playerIcons = ""
|
||||
enemyIcons = "_blue"
|
||||
|
||||
if self.parent.get_display_rule("go"):
|
||||
painter.save()
|
||||
|
||||
@ -50,9 +57,9 @@ class QMapGroundObject(QGraphicsRectItem):
|
||||
cat = "ship"
|
||||
|
||||
if not self.model.is_dead and not self.cp.captured:
|
||||
painter.drawPixmap(option.rect, CONST.ICONS[cat])
|
||||
painter.drawPixmap(option.rect, CONST.ICONS[cat + enemyIcons])
|
||||
elif not self.model.is_dead:
|
||||
painter.drawPixmap(option.rect, CONST.ICONS[cat + "_blue"])
|
||||
painter.drawPixmap(option.rect, CONST.ICONS[cat + playerIcons])
|
||||
else:
|
||||
painter.drawPixmap(option.rect, CONST.ICONS["destroyed"])
|
||||
painter.restore()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user