| 1822 | } |
| 1823 | |
| 1824 | static void GetInGetOut(AISubgroupContext* context) |
| 1825 | { |
| 1826 | STATE_PREFIX |
| 1827 | if (!subgrp->HasAI()) |
| 1828 | { |
| 1829 | return; |
| 1830 | } |
| 1831 | |
| 1832 | LogFSM(subgrp, "GetIn", "GETOUT"); |
| 1833 | |
| 1834 | AIUnit* unit = subgrp->Leader(); |
| 1835 | AI_ERROR(unit); |
| 1836 | |
| 1837 | unit->OrderGetIn(true); |
| 1838 | if (!unit->IsFreeSoldier()) |
| 1839 | { |
| 1840 | PackedBoolArray list; |
| 1841 | list.Set(unit->ID() - 1, true); |
| 1842 | Command cmd; |
| 1843 | cmd._message = Command::GetOut; |
| 1844 | cmd._context = Command::CtxAutoSilent; |
| 1845 | cmd._id = subgrp->GetGroup()->GetNextCmdId(); |
| 1846 | subgrp->GetGroup()->IssueCommand(cmd, list); |
| 1847 | } |
| 1848 | } |
| 1849 | |
| 1850 | static void CheckGetInGetOut(AISubgroupContext* context) |
| 1851 | { |
nothing calls this directly
no test coverage detected