| 73 | namespace Poseidon |
| 74 | { |
| 75 | void SetCommandState(int id, CommandState state, AISubgroup* subgrp) |
| 76 | { |
| 77 | AIGroup* grp = subgrp->GetGroup(); |
| 78 | for (int i = 0; i < GMainMapInfo.commands.Size();) |
| 79 | { |
| 80 | CommandInfo& cmd = GMainMapInfo.commands[i]; |
| 81 | if (cmd.grp == grp && cmd.id == id) |
| 82 | { |
| 83 | cmd.state = state; |
| 84 | cmd.subgrp = subgrp; |
| 85 | i++; |
| 86 | } |
| 87 | else if (cmd.subgrp == subgrp) |
| 88 | { |
| 89 | GMainMapInfo.commands.Delete(i); |
| 90 | } |
| 91 | else |
| 92 | { |
| 93 | i++; |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | } // namespace Poseidon |
| 98 | |
| 99 | void AddUnitInfo(AIUnit* unit) |
no test coverage detected