d3214a0 follow-up for code style.

This commit is contained in:
treeston
2016-09-21 16:49:19 +02:00
parent d3214a0012
commit 4deeee66bd
2 changed files with 3 additions and 0 deletions

View File

@@ -142,10 +142,12 @@ SplineChainResumeInfo SplineChainMovementGenerator::GetResumeInfo(Unit const* me
/* static */ void SplineChainMovementGenerator::GetResumeInfo(Unit const* me, SplineChainResumeInfo& info)
{
if (MovementGenerator const* activeGen = me->GetMotionMaster()->GetMotionSlot(MOTION_SLOT_ACTIVE))
{
if (activeGen->GetMovementGeneratorType() == SPLINE_CHAIN_MOTION_TYPE)
{
info = reinterpret_cast<SplineChainMovementGenerator const*>(activeGen)->GetResumeInfo(me);
return;
}
}
info.Chain = nullptr;
}

View File

@@ -37,6 +37,7 @@ struct TC_GAME_API SplineChainResumeInfo
SplineChainResumeInfo(uint32 id, SplineChain const* chain, bool walk, uint8 splineIndex, uint8 wpIndex, uint32 msToNext) :
PointID(id), Chain(chain), IsWalkMode(walk), SplineIndex(splineIndex), PointIndex(wpIndex), TimeToNext(msToNext) { }
bool Empty() const { return Chain == nullptr; }
void Clear() { Chain = nullptr; }
uint32 PointID;
SplineChain const* Chain;
bool IsWalkMode;