[-] Fixed spell sound distance calculation
This commit is contained in:
parent
8c5ec2dae0
commit
b8a682ac25
1 changed files with 1 additions and 1 deletions
|
@ -533,7 +533,7 @@ int SpellCast(CUnit &caster, const SpellType &spell, CUnit *target, const Vec2i
|
|||
if (spell.Target == TargetSelf) {
|
||||
PlayUnitSound(caster, spell.SoundWhenCast.Sound);
|
||||
} else {
|
||||
PlayGameSound(spell.SoundWhenCast.Sound, CalculateVolume(false, ViewPointDistance(goalPos), spell.SoundWhenCast.Sound->Range));
|
||||
PlayGameSound(spell.SoundWhenCast.Sound, CalculateVolume(false, ViewPointDistance(target ? target->tilePos : goalPos), spell.SoundWhenCast.Sound->Range));
|
||||
}
|
||||
}
|
||||
for (std::vector<SpellActionType *>::const_iterator act = spell.Action.begin();
|
||||
|
|
Loading…
Reference in a new issue