clintbellanger/flare-engine — pull request #793 by dorkster (2013-09-26 23:19:26+00:00)
Title: Prevent excessive is_valid_position() calls during positive x/y sliding

When we were using integer units for positions within tiles, it was easy
to determine the point right before the next tile. If we had 512 units
per tile, 511 would be the point before the next tile. Figuring out this
point isn't easy with floating point positions, since the number that
comes before 1.0 goes on for quite a bit.

This commit places a limit on how small steps can get when attempting to
slide along a surface in a positive direction (aka east or south). I did
some testing with perf while looking at is_valid_position(). Without the
patch, about 49.76% of cycles were dedicated to that function. With the
patch, only 0.17% of cycles were used.