Core/Spells: improve random radius calculation by reducing the chance of hitting the center the closer we get

This commit is contained in:
Ovahlord committed 2026-06-08 20:27:42 +02:00
1 parent 8075d11c5d
commit 71e233eddc
1 file changed
+1 -1
+1 -1
View File
@@ -674,7 +674,7 @@ float SpellEffectInfo::CalcRadius(WorldObject* caster /*= nullptr*/, SpellTarget
if (target.GetTarget() == TARGET_DEST_CASTER_RANDOM ||
target.GetTarget() == TARGET_DEST_TARGET_RANDOM ||
target.GetTarget() == TARGET_DEST_DEST_RANDOM)
radius += (entry->RadiusMax - radius) * rand_norm();
radius += (entry->RadiusMax - radius) * std::sqrt(rand_norm());
else if (radius == 0.0f)
radius = entry->RadiusMax;