This is a list of changes I made:
GlobalAI:
* added new event to IGlobalAI: EnemyDamaged (int damaged, int attacker, float damage, float3 dir)
- it is called when enemy inside LOS is damaged by one of your (ai) units
AICallback:
* added 3 new functions to CAICallback:
- int GetBuildingFacing(int unitid) (needed for rotatable buildings)
- bool IsUnitCloaked(int unitid)
- bool IsUnitParalyzed(int unitid)
* removed AIVAL_SLOPE_MAP, AIVAL_MAX_HEIGHT, AIVAL_MIN_HEIGHT variables from GetValue() function
added float GetMinHeight(), float GetMaxHeight(), const float* GetSlopeMap() functions instead, so all functions concerning map info are now together
* removed AIVAL_MAX_METAL from GetValue() as there is GetMaxMetal() function already
* changed HandleCommand(void *data) function to HandleCommand(int commandId, void *data), so it is now easier to use
AICheats:
* added GetUnitTeam, GetUnitAllyTeam, GetUnitHealth, GetUnitMaxHealth, GetUnitPower, GetUnitExperience, IsUnitActivated, UnitBeingBuilt, GetUnitResourceInfo, GetCurrentUnitCommands, GetBuildingFacing, IsUnitCloaked, IsUnitParalyzed functions to CAICheats - they are the same as in CAICallback but without LOS checks
* added GetProperty(int id, int property, void *dst), GetValue(int id, void *dst) and HandleCommand(int commandId, void *data) functions to CAICheats, so cheat interface is now extendable too
* added void EnableCheatEvents(bool enable) function. If set to true it enable AI to get events such as EnemyDamaged and EnemyDestroyed even if enemy is outside LOS and radar
And some bugfixes:
* fixed bug with CAICallback::GetMinWind() and CAICallback::GetMaxWind() functions always giving wrong values when called inside CGlobalAI::InitAi
* changed so UnitDamaged function is now called after unit gets paralyzed and after attacker gets experience, as it should be
And some smaller things I omitted, cause they don't have much importance for AI coders.
All these additions will be available in 0.73b1. Hope AI makers will find them useful.
