mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 06:12:19 +00:00
Fixed applying of multiple pain chances
https://mantis.zdoom.org/view.php?id=608
This commit is contained in:
parent
e19f6fe8ea
commit
c681d6eff0
1 changed files with 5 additions and 2 deletions
|
@ -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 a new issue