Permalink
Browse files

Actor::PlayHitSound: moved the armor check safety, so it's not dead code

coverity 4345
  • Loading branch information...
1 parent 2bf3615 commit 90999f6af0b736b13dd2dd1126420946ee1fa022 @lynxlynxlynx lynxlynxlynx committed Apr 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 gemrb/core/Scriptable/Actor.cpp
@@ -4106,12 +4106,12 @@ void Actor::PlayHitSound(DataFileMgr *resdata, int damagetype, bool suffix)
snprintf(section,10,"%d", animid);
- if (armor<0 || armor>35) return;
if (type<0) {
type = -type;
} else {
armor = resdata->GetKeyAsInt(section, "armor",0);
}
+ if (armor<0 || armor>35) return;
} else {
//hack for stun (always first armortype)
if (type<0) {

0 comments on commit 90999f6

Please sign in to comment.