empirical results and new hypothesis
Actually, you only get stuck if there's a small (meaning between -15 and 16 inclusive) x-speed and a non-zero y-speed. As long as the x-speed is large (-16 or lower, or 17 or higher), it doesn't matter what y-speed you have. To take a guess at why this works, in pseudo-code:
Code:
z = player.current_zone
if z.class = sucker_tube {
if z.yspeed {
player.xpos = z.xpos
player.yspeed = z.yspeed
} if z.xspeed {
player.ypos = z.ypos
player.xspeed = z.xspeed
}
}
This isn't quite right, because it's not just a matter of setting the player y-position, there's also some sort of temporary nullification of y-speed (an upward diagonal tube sends you not quite as high as an upward non-diagonal tube, meaning that the first movement caused by the y-speed fails to take place, but the y-speed created by the tube is maintained even through the x-speed check), but I think it's along the right lines.
__________________
|