This commit is contained in:
aozhiwei 2022-10-26 17:24:50 +08:00
parent 7e35106ca0
commit fde4c50b68
2 changed files with 3 additions and 3 deletions

View File

@ -616,7 +616,7 @@ bool Obstacle::CanThroughable(Creature* c)
return false;
}
bool Obstacle::CanThroughable(Bullet* bullet)
bool Obstacle::CanThroughable(IBullet* bullet)
{
switch (meta->i->bullet_hit()) {
case kBulletHitPass:
@ -627,7 +627,7 @@ bool Obstacle::CanThroughable(Bullet* bullet)
case kBulletHitOnlySpecDmg:
{
return !(meta->receive_special_damage_type != 0 &&
((bullet->gun_meta->special_damage_type & meta->receive_special_damage_type) != 0));
((bullet->GetGunMeta()->special_damage_type & meta->receive_special_damage_type) != 0));
}
break;
default:

View File

@ -46,7 +46,7 @@ class Obstacle : public Entity
virtual void OnExplosionHit(Explosion* explosion) override;
virtual bool Attackable(Room* room) override;
virtual bool CanThroughable(Creature* c);
virtual bool CanThroughable(Bullet* bullet);
virtual bool CanThroughable(IBullet* bullet);
virtual bool DoInteraction(Human* sender);
virtual int OnCollisionTrigger(Creature* c, ColliderComponent* collider);
virtual bool CanSeeMe(Human* hum);