Exemple #1
0
void UnitStateMgr::DropAllStates()
{
    // Assume, that if only one action - that IDLE appears (rechecked later).
    if (m_actions.size() > 1 )
    {
        DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "UnitStateMgr:DropAllStates %s drop all active states (count = %u)", GetOwnerStr().c_str(), m_actions.size());
        DropActionHigherThen(UNIT_ACTION_PRIORITY_IDLE);
    }
    // Unique action after dropping may be not UNIT_ACTION_IDLE
    if (m_actions.empty() || GetCurrentState() != UNIT_ACTION_IDLE)
        PushAction(UNIT_ACTION_IDLE);
}
Exemple #2
0
void UnitStateMgr::DropAllStates()
{
    DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "UnitStateMgr:DropAllStates %s drop all active states", GetOwnerStr().c_str());
    DropActionHigherThen(UNIT_ACTION_PRIORITY_IDLE);
    PushAction(UNIT_ACTION_IDLE);
}