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.