mirror of https://github.com/ZDoom/qzdoom.git
Fixed applying of multiple pain chances
https://mantis.zdoom.org/view.php?id=608
This commit is contained in:
parent
e19f6fe8ea
commit
c681d6eff0
|
@ -532,8 +532,11 @@ void PClassActor::SetPainChance(FName type, int chance)
|
||||||
{
|
{
|
||||||
for (auto & p : ActorInfo()->PainChances)
|
for (auto & p : ActorInfo()->PainChances)
|
||||||
{
|
{
|
||||||
if (p.first == type) p.second = chance;
|
if (p.first == type)
|
||||||
return;
|
{
|
||||||
|
p.second = chance;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chance >= 0)
|
if (chance >= 0)
|
||||||
|
|
Loading…
Reference in New Issue