GitLab's annual major release is around the corner. Along with a lot of new and exciting features, there will be a few breaking changes. Learn more here.

Commit 8567ec13 authored by Christopho's avatar Christopho
Browse files

Allow teletransporters to scroll with any thickness

parent 90b2b9af
......@@ -81,17 +81,21 @@ void Teletransporter::notify_creating() {
// Compute the destination side in case the destination name is "_side"
// or becomes it later.
if (get_width() == 16 && x == -16) {
destination_side = 0;
}
else if (get_width() == 16 && x == get_map().get_width()) {
destination_side = 2;
}
else if (get_height() == 16 && y == -16) {
destination_side = 3;
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_height() == 16 && y == get_map().get_height()) {
destination_side = 1;
else if (get_width() > get_height()) {
if (y + get_height() == 0) {
destination_side = 3;
}
else if (y == get_map().get_height()) {
destination_side = 1;
}
}
if (destination_side != -1) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment