fix(Core/Movement): Removed some leftover after c8f43d8584. (#13524)

Closes #2623
This commit is contained in:
UltraNix
2022-10-29 12:11:36 +02:00
committed by GitHub
parent 420aee4b25
commit ab9c648504
7 changed files with 17 additions and 29 deletions

View File

@@ -370,11 +370,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint16 flags) const
// 0x08000000
if (unit->m_movementInfo.GetMovementFlags() & MOVEMENTFLAG_SPLINE_ENABLED)
{
const G3D::Vector3* p = &unit->movespline->_Spline().getPoints(true)[0];
if (unit->movespline->_Spline().getPoints(true).empty() || (!unit->movespline->_Spline().getPoints(true).empty() && !p))
const_cast<Unit*>(unit)->DisableSpline();
else
Movement::PacketBuilder::WriteCreate(*unit->movespline, *data);
Movement::PacketBuilder::WriteCreate(*unit->movespline, *data);
}
}
else