diff options
| author | Shauren <shauren.trinity@gmail.com> | 2023-10-31 20:20:00 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2023-10-31 20:20:00 +0100 |
| commit | 9894f6b802c974bb36acd7fbb0d083455a1f0f1b (patch) | |
| tree | 458f167a846d70d4b2391c805423d9342b36f89a /src/server/scripts/EasternKingdoms | |
| parent | a0fdac0ecc119b4ba85d41f86891b3cd35f7acde (diff) | |
Core/Random: Changed random functions returning doubles to return floats
* They were all cast to float at use anyway
* Improves roll_chance_f performance (rand32() is now called internally by uniform_real_distribution once instead of twice)
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
| -rw-r--r-- | src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp index d5e0e4f31d5..145f5acce61 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp @@ -530,7 +530,7 @@ class spell_mandokir_devastating_slam : public SpellScript // HACK: Need better way for pos calculation for (uint8 i = 0; i <= 50; ++i) { - angle = float(rand_norm()) * static_cast<float>(M_PI * 35.0f / 180.0f) - static_cast<float>(M_PI * 17.5f / 180.0f); + angle = rand_norm() * static_cast<float>(M_PI * 35.0f / 180.0f) - static_cast<float>(M_PI * 17.5f / 180.0f); caster->GetClosePoint(x, y, z, 4.0f, frand(-2.5f, 50.0f), angle); caster->CastSpell(Position{ x, y, z }, SPELL_DEVASTATING_SLAM_DAMAGE, true); |
