Change ReturnToPreviousMap function to re-load current map if unload = true and no previous map exists instead of ignoring the request.
Change GetNearestSpriteIndex to ignore the current sprite.
Correct distance calculation in PushTowardSprite.
Change SetInputsTowardCategory to turn off all directional inputs if no sprite in target category exists.