summaryrefslogtreecommitdiff
path: root/src/game.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.rs')
-rw-r--r--src/game.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game.rs b/src/game.rs
index 2eabcb2..8e86b99 100644
--- a/src/game.rs
+++ b/src/game.rs
@@ -35,6 +35,11 @@ impl EventHandler for Game {
fn update(&mut self, _context: &mut Context) -> GameResult {
self.world.update();
self.camera.give_center(self.world.player.get_position());
+
+ if !self.world.player_in_talking_range() {
+ self.dialogbox.give_dialogtree(None);
+ }
+
self.dialogbox.update();
Ok(())
}