File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1140,9 +1140,6 @@ void Npc::takeDamage(Npc &other, const Bullet *b) {
11401140 perceptionProcess (other,this ,0 ,PERC_ASSESSDAMAGE);
11411141 owner.sendPassivePerc (*this ,other,*this ,PERC_ASSESSOTHERSDAMAGE);
11421142
1143- if (!isDown ())
1144- owner.emitWeaponsSound (other,*this );
1145-
11461143 lastHit = &other;
11471144 fghAlgo.onTakeHit ();
11481145 implFaiWait (0 );
@@ -1151,6 +1148,12 @@ void Npc::takeDamage(Npc &other, const Bullet *b) {
11511148 int dmg = isImmortal () ? 0 : other.damageValue (*this ,b);
11521149 if (isPlayer () && owner.script ().isRamboMode ())
11531150 dmg = std::min (1 ,dmg);
1151+
1152+ if (dmg<=0 )
1153+ return ;
1154+
1155+ if (!isDown ())
1156+ owner.emitWeaponsSound (other,*this );
11541157 changeAttribute (ATR_HITPOINTS,-dmg,b==nullptr );
11551158
11561159 if (isUnconscious ()){
You can’t perform that action at this time.
0 commit comments