Currently, UnitAI does two kind of queries. A "LOS"-query (which actually is related to cmpAttack) and a heal-query.
This diff splits the "LOS"-query in two separate queries, namely one to determine when to attack an entity and one to react on a newly seen enemy.
This is first and foremost needed to fix some issues regarding animal behaviour in D2646, but in the future it can be used for more things, like: