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:
Shauren
2011-09-30 18:24:12 +02:00
parent 18aad847e1
commit da54fb92d5
4 changed files with 20 additions and 8 deletions

View File

@@ -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);