mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-01 22:30:48 +00:00
Fixed applying of multiple damage factors
https://mantis.zdoom.org/view.php?id=586
This commit is contained in:
parent
0ebf4958b9
commit
490fd8f3a0
1 changed files with 5 additions and 2 deletions
|
@ -513,9 +513,12 @@ void PClassActor::SetDamageFactor(FName type, double factor)
|
||||||
{
|
{
|
||||||
for (auto & p : ActorInfo()->DamageFactors)
|
for (auto & p : ActorInfo()->DamageFactors)
|
||||||
{
|
{
|
||||||
if (p.first == type) p.second = factor;
|
if (p.first == type)
|
||||||
|
{
|
||||||
|
p.second = factor;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ActorInfo()->DamageFactors.Push({ type, factor });
|
ActorInfo()->DamageFactors.Push({ type, factor });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue