fschulze / jumpnbump

Bunny mayhem with lots of ketchup!
http://www.icculus.org/jumpnbump/
GNU General Public License v2.0
9 stars 8 forks source link

fix rabbit disappearing in upper left corner #1

Open fabiangreffrath opened 10 years ago

fabiangreffrath commented 10 years ago

aka "undesired springs added above the screen"

If the bunny jumps out of the screen, its y-coordinate becomes negative. Thus, the array that is checked for the position of the objects on the map overflows and returns some bogus, e.g. that there are springs whereas there aren't. This patch checks for the y-coordinate and caps it at zero.

c.f. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=370650