Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • solarus solarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 222
    • Issues 222
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Solarus Games
  • solarussolarus
  • Issues
  • #1412

Closed
Open
Created Aug 15, 2019 by Antoine Belvire@super7rampContributor

Square teletransporters with destination side are ineffective since Solarus 1.6.1

Since Solarus 1.6.1, more precisely since commit 8567ec13, it's not possible to move from "Freaking_cave_1" to "Freaking_cave_2" in zsxd.

The problematic teletransporter is 16x16, so with width equals to height:

teletransporter{
  layer = 0,
  x = 152,
  y = -16,
  width = 16,
  height = 16,
  name = "teletransporter_2",
  transition = "scrolling",
  destination_map = "39",
  destination = "_side",
}

But this case is missing in Teletransporter.cpp:notify_creation() when computing destination side:

  // Compute the destination side in case the destination name is "_side"
  // or becomes it later.
  if (get_height() > get_width()) {
    if (x + get_width() == 0) {
      destination_side = 0;
    }
    else if (x == get_map().get_width()) {
      destination_side = 2;
    }
  }
  else if (get_width() > get_height()) {
    if (y + get_height() == 0) {
      destination_side = 3;
    }
    else if (y == get_map().get_height()) {
      destination_side = 1;
    }
  }

I'm not sure why width and height are involved here.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking