mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +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,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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue