From c681d6eff08f61a040421df1aa806bc76c7134c3 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 20 Apr 2017 22:09:18 +0300 Subject: [PATCH] Fixed applying of multiple pain chances https://mantis.zdoom.org/view.php?id=608 --- src/info.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/info.cpp b/src/info.cpp index 94a4c4fb5..1eee76fcd 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -532,8 +532,11 @@ void PClassActor::SetPainChance(FName type, int chance) { for (auto & p : ActorInfo()->PainChances) { - if (p.first == type) p.second = chance; - return; + if (p.first == type) + { + p.second = chance; + return; + } } if (chance >= 0)