mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 13:23:56 -07:00
Partial fix to a formation "gliding" issue, unsure so far what is causing this.
This was SVN commit r17198.
This commit is contained in:
parent
3163c9d4a2
commit
c319ff062d
1 changed files with 19 additions and 1 deletions
|
|
@ -581,6 +581,12 @@ private:
|
|||
|
||||
void StartSucceeded()
|
||||
{
|
||||
CmpPtr<ICmpObstruction> cmpObstruction(GetEntityHandle());
|
||||
if (cmpObstruction)
|
||||
cmpObstruction->SetMovingFlag(true);
|
||||
|
||||
m_Moving = true;
|
||||
|
||||
CMessageMotionChanged msg(true, false);
|
||||
GetSimContext().GetComponentManager().PostMessage(GetEntityId(), msg);
|
||||
}
|
||||
|
|
@ -1023,6 +1029,10 @@ void CCmpUnitMotion::Move(fixed dt)
|
|||
CmpPtr<ICmpUnitMotion> cmpUnitMotion(GetSimContext(), m_TargetEntity);
|
||||
if (cmpUnitMotion && !cmpUnitMotion->IsMoving())
|
||||
{
|
||||
CmpPtr<ICmpObstruction> cmpObstruction(GetEntityHandle());
|
||||
if (cmpObstruction)
|
||||
cmpObstruction->SetMovingFlag(false);
|
||||
|
||||
m_Moving = false;
|
||||
CMessageMotionChanged msg(false, false);
|
||||
GetSimContext().GetComponentManager().PostMessage(GetEntityId(), msg);
|
||||
|
|
@ -1294,8 +1304,16 @@ ControlGroupMovementObstructionFilter CCmpUnitMotion::GetObstructionFilter(bool
|
|||
|
||||
void CCmpUnitMotion::BeginPathing(const CFixedVector2D& from, const PathGoal& goal)
|
||||
{
|
||||
// Cancel any pending path requests
|
||||
// reset our state for sanity.
|
||||
m_ExpectedPathTicket = 0;
|
||||
|
||||
CmpPtr<ICmpObstruction> cmpObstruction(GetEntityHandle());
|
||||
if (cmpObstruction)
|
||||
cmpObstruction->SetMovingFlag(false);
|
||||
|
||||
m_Moving = false;
|
||||
|
||||
m_PathState = PATHSTATE_NONE;
|
||||
|
||||
#if DISABLE_PATHFINDER
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue