The IsInRange function family is currently placed in the UnitMotion component. Which is stupid since, why does a range check depend on being able to move? These function might (and will be in some of my WIP's) become useful for buildings and other non-unitMotion entities. So we need to move these function to a better place.
This patch is based on D13 (at least a split of it) with wraitii's approval. There and here the functions are moved to the ObstructionManager, since that is a system component and these functions use some of that. However if someone proposes something better, we can ship with that. (Do notice that "position" is not really an option due to the isPointinPointRange function, which doesn't require it to be units. And we use this for some cases in the other functions.)
What is changed based on D13:
- remove IsPointInTarget range, since that is a duplicate of IsInPoint range,
- Add support for square to square checks,
- Better support for sphere-square minrange
- rounding fix instead of navcell