| 2064 | } |
| 2065 | |
| 2066 | static void GetInGetIn(AISubgroupContext* context) |
| 2067 | { |
| 2068 | STATE_PREFIX |
| 2069 | if (!subgrp->HasAI()) |
| 2070 | { |
| 2071 | return; |
| 2072 | } |
| 2073 | |
| 2074 | LogFSM(subgrp, "GetIn", "GETIN"); |
| 2075 | |
| 2076 | AIUnit* leader = subgrp->Leader(); |
| 2077 | AI_ERROR(leader->IsFreeSoldier()); |
| 2078 | Transport* vehInto = dyn_cast<Transport, Object>(cmd->_target); |
| 2079 | if (!vehInto) |
| 2080 | { |
| 2081 | context->_fsm->SetState(SGetInFail, context); |
| 2082 | return; |
| 2083 | } |
| 2084 | if (!leader->ProcessGetIn(*vehInto)) |
| 2085 | { |
| 2086 | context->_fsm->SetState(SGetInFail, context); |
| 2087 | } |
| 2088 | // else subgroup dies out |
| 2089 | } |
| 2090 | |
| 2091 | static void CheckGetInGetIn(AISubgroupContext* context) |
| 2092 | { |
nothing calls this directly
no test coverage detected