From 490fd8f3a017bf1ecf19c001f4dfffce1295c601 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 15 Apr 2017 12:33:26 +0300 Subject: [PATCH] Fixed applying of multiple damage factors https://mantis.zdoom.org/view.php?id=586 --- src/info.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/info.cpp b/src/info.cpp index 4619b7585..94a4c4fb5 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -513,8 +513,11 @@ void PClassActor::SetDamageFactor(FName type, double factor) { for (auto & p : ActorInfo()->DamageFactors) { - if (p.first == type) p.second = factor; - return; + if (p.first == type) + { + p.second = factor; + return; + } } ActorInfo()->DamageFactors.Push({ type, factor }); }