diff --git a/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd index f3cf5503..f4f6ab82 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd @@ -178,6 +178,17 @@ func init_room(room: ESCRoom) -> void: if escoria.main.current_scene == null: escoria.main.set_scene(room) + # If the room node isn't at (0,0), the walk_stop function will offset the + # player by the same number of pixels when they're at the terrain edge and + # move them when it shouldn't. + if room.position != Vector2(0,0): + escoria.logger.report_errors( + "ESCRoomManager.init_room: Room node not at (0,0)", + [ + "The room node's coordinates must be (0,0) instead of %s." % room.position + ] + ) + _perform_script_events(room) diff --git a/game/rooms/room02/room02.tscn b/game/rooms/room02/room02.tscn index d1c16c78..3dcc7737 100644 --- a/game/rooms/room02/room02.tscn +++ b/game/rooms/room02/room02.tscn @@ -185,7 +185,6 @@ tracks/3/keys = { [sub_resource type="CapsuleShape2D" id=8] [node name="room2" type="Node2D"] -position = Vector2( -2, 0 ) script = ExtResource( 6 ) global_id = "room2" esc_script = "res://game/rooms/room02/esc/room02_bridge.esc"