Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Feature] Run & Walk speed values.
#7
DarkPhoenix Wrote:So it already happens without this code.... that's weird.

No, it's not.

The reason the speeds can only be 1, 2, 4, 8, 16 or 32 is because the movement is pretty much just taking the speed value away from 32 until it reaches 0, or adding it to -32, depending on which direction you're going.

Of course, if the number isn't a factor of 32, it wont reach 0 exactly, which causes it to never stop walking. This code simply makes sure that a number can never go over the maximum or under the minimum values.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)