Send messages when formation members hit fail to find a path or are obstructed.
This was SVN commit r12613.
This commit is contained in:
parent
66318d7011
commit
d805c87249
@ -625,8 +625,16 @@ void CCmpUnitMotion::PathResult(u32 ticket, const ICmpPathfinder::Path& path)
|
||||
// If there's no waypoints then we couldn't get near the target
|
||||
if (m_ShortPath.m_Waypoints.empty())
|
||||
{
|
||||
StartFailed();
|
||||
return;
|
||||
if (!IsFormationMember())
|
||||
{
|
||||
StartFailed();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
CMessageMotionChanged msg(true, true);
|
||||
GetSimContext().GetComponentManager().PostMessage(GetEntityId(), msg);
|
||||
}
|
||||
}
|
||||
|
||||
CmpPtr<ICmpPosition> cmpPosition(GetSimContext(), GetEntityId());
|
||||
@ -694,6 +702,11 @@ void CCmpUnitMotion::PathResult(u32 ticket, const ICmpPathfinder::Path& path)
|
||||
MoveFailed();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
CMessageMotionChanged msg(false, true);
|
||||
GetSimContext().GetComponentManager().PostMessage(GetEntityId(), msg);
|
||||
}
|
||||
}
|
||||
|
||||
m_PathState = PATHSTATE_FOLLOWING;
|
||||
|
Loading…
Reference in New Issue
Block a user