@@ -111,17 +111,19 @@ int32 AI_DoCommand(uint tile, uint32 p1,
/* NetworkSend_Command needs _local_player to be set correctly, so
adjust it, and put it back right after the function */
old_lp = _local_player;
_local_player = _current_player;
#ifdef ENABLE_NETWORK
/* Send the command */
if (_networking)
/* Network is easy, send it to his handler */
NetworkSend_Command(tile, p1, p2, procc, NULL);
else
#endif
/* If we execute BuildCommands directly in SP, we have a big problem with events
* so we need to delay is for 1 tick */
AI_PutCommandInQueue(_current_player, tile, p1, p2, procc);
/* Set _local_player back */
_local_player = old_lp;
#ifndef AI_H
#define AI_H
#include "../functions.h"
#include "../network.h"
#include "../player.h"
#ifdef GPMI
#include <gpmi.h>
#endif /* GPMI */
/* How DoCommands look like for an AI */
typedef struct AICommand {
Status change: