Core/Movement: Fixed knockback visibility for other players (no more "teleport") and knockback strength from creature spells (this does not fix knocking creatures back)
This commit is contained in:
@@ -1488,7 +1488,7 @@ void Position::GetSinCos(const float x, const float y, float &vsin, float &vcos)
|
||||
float dx = GetPositionX() - x;
|
||||
float dy = GetPositionY() - y;
|
||||
|
||||
if (dx < 0.001f && dy < 0.001f)
|
||||
if (fabs(dx) < 0.001f && fabs(dy) < 0.001f)
|
||||
{
|
||||
float angle = (float)rand_norm()*static_cast<float>(2*M_PI);
|
||||
vcos = cos(angle);
|
||||
|
||||
@@ -16510,7 +16510,7 @@ void Unit::KnockbackFrom(float x, float y, float speedXY, float speedZ)
|
||||
|
||||
WorldPacket data(SMSG_MOVE_KNOCK_BACK, (8+4+4+4+4+4));
|
||||
data.append(GetPackGUID());
|
||||
data << uint32(0); // Sequence
|
||||
data << uint32(0); // counter
|
||||
data << float(vcos); // x direction
|
||||
data << float(vsin); // y direction
|
||||
data << float(speedXY); // Horizontal speed
|
||||
|
||||
Reference in New Issue
Block a user