From 67e907b0d43aaeaaa35b5f19cf85752f5b15b55a Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Tue, 1 Dec 2020 04:20:37 +0100 Subject: [PATCH] Fix bug that blocked sound from reaching players. --- plomrogue/commands.py | 3 ++- plomrogue/mapping.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plomrogue/commands.py b/plomrogue/commands.py index fc087fb..a92359e 100644 --- a/plomrogue/commands.py +++ b/plomrogue/commands.py @@ -44,7 +44,8 @@ def cmd_ALL(game, msg, connection_id): if not speaker: raise GameError('need to be logged in for this') largest_audible_distance = 20 - dijkstra_map = DijkstraMap(game.things, game.maps, speaker.position, + things = [t for t in game.things if t.type_ != 'Player'] + dijkstra_map = DijkstraMap(things, game.maps, speaker.position, largest_audible_distance, game.get_map) for c_id in game.sessions: listener = game.get_player(c_id) diff --git a/plomrogue/mapping.py b/plomrogue/mapping.py index b4fadd7..6708b1b 100644 --- a/plomrogue/mapping.py +++ b/plomrogue/mapping.py @@ -278,7 +278,7 @@ class DijkstraMap(SourcedMap): # for n in self.terrain: # line_to_print += ['%3s' % n] # x += 1 - # if x >= self.size.x: + # if x >= self.geometry.size.x: # x = 0 # print(' '.join(line_to_print)) # line_to_print = [] -- 2.30.2