(svn r3304) -Add: allow AI-events to see the UID of the command

-Fix: improved the logic of the UID code for AIs
This commit is contained in:
truelight
2005-12-14 14:38:23 +00:00
parent f6330faead
commit f94da63a8d
4 changed files with 34 additions and 11 deletions

View File

@@ -51,6 +51,8 @@ typedef struct AIStruct {
VARDEF AIStruct _ai;
VARDEF AIPlayer _ai_player[MAX_PLAYERS];
VARDEF uint _ai_current_uid; //! Keeps track of the current UID, if any (0 means none)
VARDEF TileIndex _ai_current_tile; //! Keeps track of the current Tile.
// ai.c
void AI_StartNewAI(PlayerID player);
@@ -60,7 +62,8 @@ void AI_Initialize(void);
void AI_Uninitialize(void);
int32 AI_DoCommand(uint tile, uint32 p1, uint32 p2, uint32 flags, uint procc);
int32 AI_DoCommandChecked(uint tile, uint32 p1, uint32 p2, uint32 flags, uint procc);
void AI_CommandResult(uint32 cmd, uint32 p1, uint32 p2, TileIndex tile, bool failed);
void AI_GetCommandUID(uint32 cmd, uint32 p1, uint32 p2, TileIndex tile);
void AI_CommandResult(bool failed);
/** Is it allowed to start a new AI.
* This function checks some boundries to see if we should launch a new AI.