Revert "Core/Movement:"

This reverts commit 154d283d3a.
This commit is contained in:
Ovalord committed 2018-02-14 10:48:01 +01:00
1 parent 1f87277ff6
commit a64c9f5d0e
7 files changed
+28 -75

No files matched your search

+4 -30
View File
@@ -486,38 +486,20 @@ void Unit::MonsterMoveWithSpeed(float x, float y, float z, float speed, bool gen
init.Launch();
}
void Unit::UpdateSplineMovement(uint32 p_diff)
void Unit::UpdateSplineMovement(uint32 t_diff)
{
uint32 const flightSplineSyncDelay = 5 * TimeConstants::IN_MILLISECONDS;
bool arrived = movespline->Finalized();
if (movespline->Finalized())
return;
movespline->updateState(p_diff);
arrived = movespline->Finalized();
movespline->updateState(t_diff);
bool arrived = movespline->Finalized();
if (arrived)
DisableSpline();
m_movesplineTimer.Update(p_diff);
m_movesplineTimer.Update(t_diff);
if (m_movesplineTimer.Passed() || arrived)
UpdateSplinePosition();
m_FlightSplineSyncTimer.Update(p_diff);
if (m_FlightSplineSyncTimer.Passed())
{
float percent = 1.0f;
float totalTime = movespline->Duration();
if (totalTime > 0.0f)
percent = (float)movespline->timePassed() / totalTime;
// Synch flight movement for cylic movement
if (movespline->isCyclic() && IsFlying())
SendFlightSplineSync(percent);
m_FlightSplineSyncTimer.Reset(flightSplineSyncDelay);
}
}
void Unit::UpdateSplinePosition()
@@ -9002,14 +8984,6 @@ void Unit::SetSpeedRate(UnitMoveType mtype, float rate)
Movement::PacketSender(this, moveTypeToOpcode[mtype][0], moveTypeToOpcode[mtype][1], moveTypeToOpcode[mtype][2], &extra).Send();
}
void Unit::SendFlightSplineSync(float splineDist)
{
WorldPacket data(SMSG_FLIGHT_SPLINE_SYNC, 11);
data << float(splineDist);
data.appendPackGUID(GetGUID());
SendMessageToSet(&data, false);
}
void Unit::setDeathState(DeathState s)
{
// Death state needs to be updated before RemoveAllAurasOnDeath() is called, to prevent entering combat