We check max targeting distance of the entity before we target

We check maxrange (max of either targeting or weapons) before we shoot

We always sort by distance (at some point). If GetBestTarget selects something that is out of range (which it can now do) combat will do nothing, luckily CombatMissionCtrl will move us into range.