* Selects the unit at the given position on the map. * @param pos Position. * @return Pointer to a BattleUnit, or 0 when none is found. */
| 690 | * @return Pointer to a BattleUnit, or 0 when none is found. |
| 691 | */ |
| 692 | BattleUnit *SavedBattleGame::selectUnit(const Position& pos) |
| 693 | { |
| 694 | BattleUnit *bu = getTile(pos)->getUnit(); |
| 695 | |
| 696 | if (bu && bu->isOut()) |
| 697 | { |
| 698 | return 0; |
| 699 | } |
| 700 | else |
| 701 | { |
| 702 | return bu; |
| 703 | } |
| 704 | } |
| 705 | |
| 706 | /** |
| 707 | * Gets the list of nodes. |
no test coverage detected