Fixed applying of multiple damage factors

https://mantis.zdoom.org/view.php?id=586
This commit is contained in:
alexey.lysiuk 2017-04-15 12:33:26 +03:00
parent 0ebf4958b9
commit 490fd8f3a0

View file

@ -513,8 +513,11 @@ void PClassActor::SetDamageFactor(FName type, double factor)
{
for (auto & p : ActorInfo()->DamageFactors)
{
if (p.first == type) p.second = factor;
return;
if (p.first == type)
{
p.second = factor;
return;
}
}
ActorInfo()->DamageFactors.Push({ type, factor });
}