spring: develop 542fe65f | [ Diff ] [ Back to Repository ] | |||
Author | Committer | Branch | Timestamp | Parent |
---|---|---|---|---|
tvo | tvo | develop | 2006-08-26 23:37:27 | develop b697934d |
Changeset | Patch by Rafal99 <rafal_karczm at o2 pl>, plus I myself added the missing EnemyDamaged function to the AIs in SVN. Quoting the e-mail: "Here is what i have done: GlobalAI: * added EnemyDamaged (int damaged, int attacker, float damage, float3 dir) function to IGlobalAI, it is called when enemy inside LOS is damaged by one of your units AICallback: * added int GetBuildingFacing(int unitid), bool IsUnitCloaked(int unitid), bool IsUnitParalyzed(int unitid) functions to CAICallback * 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 AIVAL variables numbers so they are in order now, also added some comments about value types they are returning (look at IAICallback.h) * changed HandleCommand(void *data) function to HandleCommand(int commandId, void *data), so it is now easier to use AICheats: * copied GetUnitTeam, GetUnitAllyTeam, GetUnitHealth, GetUnitMaxHealth, GetUnitPower, GetUnitExperience, IsUnitActivated, UnitBeingBuilt, GetUnitResourceInfo, GetCurrentUnitCommands, GetBuildingFacing, IsUnitCloaked(int unitid), IsUnitParalyzed(int unitid) from CAICallback so they are now available without LOS checks too * added GetProperty(int id, int property, void *dst), GetValue(int id, void *dst) and HandleCommand(int commandId, void *data) functions, so cheat interface is now extendable too * added void EnableCheatEvents(bool enable) function which allow AIs to get EnemyDamaged and EnemyDestroyed events even if enemy is outside LOS and radar OtherChanges: * increased GLOBAL_AI_INTERFACE_VERSION and AI_INTERFACE_VERSION * moved CGlobalAICallback::ai to private section so ais can't access it now * removed lots of unnecessary includes from GlobalAICallback.cpp and GroupAICallback.cpp * fixed problem with CAICallback::GetMinWind() and CAICallback::GetMaxWind() functions always giving wrong values when called inside CGlobalAI::InitAi It happened because information about wind was readed in the first frame, so after CGlobalAI::InitAi is called. Changed it so wind info is now loaded in CGame::CGame() (added one line to game.cpp, hope it won't cause any desyncs or such things) * changed so CGlobalAIHandler::UnitDamaged is now called after unit is paralyzed and after attacker gets experience, as it should be" git-svn-id: https://spring.clan-sy.com/svn/spring/trunk@1963 37977431-3df6-0310-b722-df95706aa16b |
|||
mod - AI/Global/AAI/AAI.cpp | [ Diff ] [ File ] | |||
mod - AI/Global/AAI/AAI.h | [ Diff ] [ File ] | |||
mod - AI/Global/JCAI/GlobalAI.cpp | [ Diff ] [ File ] | |||
mod - AI/Global/JCAI/GlobalAI.h | [ Diff ] [ File ] | |||
mod - AI/Global/NTAI/Core/GlobalAI.cpp | [ Diff ] [ File ] | |||
mod - AI/Global/NTAI/Core/GlobalAI.h | [ Diff ] [ File ] | |||
mod - AI/Global/TestGlobalAI/TestGlobalAI.cpp | [ Diff ] [ File ] | |||
mod - AI/Global/TestGlobalAI/TestGlobalAI.h | [ Diff ] [ File ] | |||
mod - rts/ExternalAI/AICallback.cpp | [ Diff ] [ File ] | |||
mod - rts/ExternalAI/AICallback.h | [ Diff ] [ File ] | |||
mod - rts/ExternalAI/AICheats.cpp | [ Diff ] [ File ] | |||
mod - rts/ExternalAI/AICheats.h | [ Diff ] [ File ] | |||
mod - rts/ExternalAI/GlobalAI.cpp | [ Diff ] [ File ] | |||
mod - rts/ExternalAI/GlobalAI.h | [ Diff ] [ File ] | |||
mod - rts/ExternalAI/GlobalAICallback.cpp | [ Diff ] [ File ] | |||
mod - rts/ExternalAI/GlobalAICallback.h | [ Diff ] [ File ] | |||
mod - rts/ExternalAI/GlobalAIHandler.cpp | [ Diff ] [ File ] | |||
mod - rts/ExternalAI/GlobalAIHandler.h | [ Diff ] [ File ] | |||
mod - rts/ExternalAI/GroupAiCallback.cpp | [ Diff ] [ File ] | |||
mod - rts/ExternalAI/IAICallback.h | [ Diff ] [ File ] | |||
mod - rts/ExternalAI/IAICheats.h | [ Diff ] [ File ] | |||
mod - rts/ExternalAI/IGlobalAI.h | [ Diff ] [ File ] | |||
mod - rts/ExternalAI/IGroupAI.h | [ Diff ] [ File ] | |||
mod - rts/Game/Game.cpp | [ Diff ] [ File ] | |||
mod - rts/Sim/Misc/Wind.cpp | [ Diff ] [ File ] | |||
mod - rts/Sim/Misc/Wind.h | [ Diff ] [ File ] | |||
mod - rts/Sim/Units/Unit.cpp | [ Diff ] [ File ] |