diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2018-07-26 21:04:43 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2018-07-27 17:15:49 +0200 |
commit | 88d9fe6e81e5063a6c34c4b4fd01e4b0fb69736a (patch) | |
tree | 8d00b90087b568bdb7238d06ea74d4e73592d1c0 | |
parent | 49fe6a0b52cee75e51c7ddaebf1d416552b28dff (diff) |
game: Use map positions for teleportation.
-rw-r--r-- | scenes/game.scm | 10 |
1 files changed, 8 insertions, 2 deletions
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 |