(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.

This commit is contained in:
rubidium
2007-01-10 18:56:51 +00:00
parent ce75f6549d
commit a7d0cdf95f
190 changed files with 2825 additions and 2208 deletions

View File

@@ -5,6 +5,7 @@
#include "../variables.h"
#include "../command.h"
#include "../network/network.h"
#include "../helpers.hpp"
#include "ai.h"
#include "default/default.h"
@@ -50,11 +51,11 @@ static void AI_PutCommandInQueue(PlayerID player, TileIndex tile, uint32 p1, uin
if (_ai_player[player].queue_tail == NULL) {
/* There is no item in the queue yet, create the queue */
_ai_player[player].queue = malloc(sizeof(AICommand));
MallocT(&_ai_player[player].queue, 1);
_ai_player[player].queue_tail = _ai_player[player].queue;
} else {
/* Add an item at the end */
_ai_player[player].queue_tail->next = malloc(sizeof(AICommand));
MallocT(&_ai_player[player].queue_tail->next, 1);
_ai_player[player].queue_tail = _ai_player[player].queue_tail->next;
}