Fixed applying of multiple pain chances

https://mantis.zdoom.org/view.php?id=608
This commit is contained in:
alexey.lysiuk 2017-04-20 22:09:18 +03:00
parent e19f6fe8ea
commit c681d6eff0
1 changed files with 5 additions and 2 deletions

View File

@ -532,9 +532,12 @@ void PClassActor::SetPainChance(FName type, int chance)
{
for (auto & p : ActorInfo()->PainChances)
{
if (p.first == type) p.second = chance;
if (p.first == type)
{
p.second = chance;
return;
}
}
if (chance >= 0)
{