The problem is not that weapons only shoot when in range, the problem is that the ai behavior is determined by an arbitrary value. The updateState method switches states once the target is in firing range. If this firing range is less than the actual firing range, they lose potential attacking time.