equal
deleted
inserted
replaced
49 { |
49 { |
50 AICommand *com; |
50 AICommand *com; |
51 |
51 |
52 if (_ai_player[player].queue_tail == NULL) { |
52 if (_ai_player[player].queue_tail == NULL) { |
53 /* There is no item in the queue yet, create the queue */ |
53 /* There is no item in the queue yet, create the queue */ |
54 MallocT(&_ai_player[player].queue, 1); |
54 _ai_player[player].queue = MallocT<AICommand>(1); |
55 _ai_player[player].queue_tail = _ai_player[player].queue; |
55 _ai_player[player].queue_tail = _ai_player[player].queue; |
56 } else { |
56 } else { |
57 /* Add an item at the end */ |
57 /* Add an item at the end */ |
58 MallocT(&_ai_player[player].queue_tail->next, 1); |
58 _ai_player[player].queue_tail->next = MallocT<AICommand>(1); |
59 _ai_player[player].queue_tail = _ai_player[player].queue_tail->next; |
59 _ai_player[player].queue_tail = _ai_player[player].queue_tail->next; |
60 } |
60 } |
61 |
61 |
62 /* This is our new item */ |
62 /* This is our new item */ |
63 com = _ai_player[player].queue_tail; |
63 com = _ai_player[player].queue_tail; |