Skip to content

Commit

Permalink
Only display MX award widget to non-spectating players. (#1145)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMaximum committed Feb 14, 2022
1 parent 79fbadd commit 0bf6a52
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyplanet/apps/contrib/mx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ async def podium_start(self, **kwargs):
mx_info = await self.api.map_info(self.instance.map_manager.current_map.uid)
if mx_info and len(mx_info) >= 1:
self.award_widget.mx_id = mx_info[0][0]
await self.award_widget.display()

# Only display the award widget to the playing players.
play_logins = [p.login for p in self.instance.player_manager.online if not p.flow.is_spectator]
await self.award_widget.display(player_logins=play_logins)

async def podium_end(self, **kwargs):
await self.award_widget.hide()
Expand Down

0 comments on commit 0bf6a52

Please sign in to comment.