mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-06 00:48:39 +01:00
Core/Movement: Remove random direction knockbacks and instead use unit orientation (#27194)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -69,9 +69,9 @@ void Position::GetSinCos(const float x, const float y, float &vsin, float &vcos)
|
||||
|
||||
if (std::fabs(dx) < 0.001f && std::fabs(dy) < 0.001f)
|
||||
{
|
||||
float angle = (float)rand_norm()*static_cast<float>(2 * M_PI);
|
||||
vcos = std::cos(angle);
|
||||
vsin = std::sin(angle);
|
||||
float o = NormalizeOrientation(GetOrientation() - M_PI);
|
||||
vcos = std::cos(o);
|
||||
vsin = std::sin(o);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user