From 88d9fe6e81e5063a6c34c4b4fd01e4b0fb69736a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 26 Jul 2018 21:04:43 +0200 Subject: game: Use map positions for teleportation. --- scenes/game.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'scenes') diff --git a/scenes/game.scm b/scenes/game.scm index cb05f70..1591844 100644 --- a/scenes/game.scm +++ b/scenes/game.scm @@ -226,11 +226,17 @@ be executed; if so, perform the action." (lambda (obj) (match (map-object-name obj) ("enter-house" - (teleport player 560.0 1800.0) + (let ((house-pos (start-position game "house"))) + (teleport player + (vec2-x house-pos) + (vec2-y house-pos))) ;; TODO: change music? (pause-music)) ("exit-house" - (teleport player 620.0 1100.0) + (let ((exited-house-pos (start-position game "exited-house"))) + (teleport player + (vec2-x exited-house-pos) + (vec2-y exited-house-pos))) (resume-music)) ("talk-to-reaper" (start-talking player -- cgit v1.2.3