What's the expected benefit of the feature you are requesting?
While stepping through the code to find a bug, I've found that walking seems to be very inefficient code-wise.
Every frame
The angle the character is facing is rechecked
The play_animation function loops through every animation suffix checking if it has an animation for the direction the character is facing
If the character isn't on a scaling region its walk_speed is reset
All of this seems very inefficient (plus it makes debugging hard as you step through lots of (potentially) unnecessary code)
Describe the solution you'd like
Walk speed/direction/animation being used etc are all cached. If something changes they're reevaluated. The navigation should be something like
If the character isn't on a scaling region, and they're travelling the same direction they were last time, reuse the same walk speed and animation and move the character.
What's the expected benefit of the feature you are requesting?
While stepping through the code to find a bug, I've found that walking seems to be very inefficient code-wise. Every frame
All of this seems very inefficient (plus it makes debugging hard as you step through lots of (potentially) unnecessary code)
Describe the solution you'd like
Walk speed/direction/animation being used etc are all cached. If something changes they're reevaluated. The navigation should be something like If the character isn't on a scaling region, and they're travelling the same direction they were last time, reuse the same walk speed and animation and move the character.
Describe alternatives you've considered
None
Additional context
None