This commit is contained in:
aozhiwei 2021-06-22 11:37:14 +00:00
parent 2a9c1a57cf
commit 2aa7678755

View File

@ -539,6 +539,12 @@ void Obstacle::OnExplosionHit(Explosion* e)
if (meta->i->explosion_hit() == kExplosionHitEatDmg) { if (meta->i->explosion_hit() == kExplosionHitEatDmg) {
return; return;
} }
if (IsDead(e->GetRoom())) {
return;
}
if (e->GetDmg() < 0.001f) {
return;
}
float dmg = e->GetDmg(); float dmg = e->GetDmg();
float def = 0; float def = 0;
float finaly_dmg = dmg * (1 - def/MetaMgr::Instance()->K); float finaly_dmg = dmg * (1 - def/MetaMgr::Instance()->K);