1
This commit is contained in:
parent
6de0120c35
commit
b819435e53
@ -395,7 +395,11 @@ void Bullet::Check(float distance)
|
||||
std::set<ColliderComponent*> colliders;
|
||||
room->map_service->GetColliders(room, GetX(), GetY(), colliders);
|
||||
for (ColliderComponent* collider : colliders) {
|
||||
if (collider->owner->IsEntityType(ET_Obstacle)) {
|
||||
if (collider->owner->IsEntityType(ET_Dummy)) {
|
||||
if (TestCollision(room, collider)) {
|
||||
objects.insert(collider->owner);
|
||||
}
|
||||
} else if (collider->owner->IsEntityType(ET_Obstacle)) {
|
||||
Obstacle* obstacle = (Obstacle*)collider->owner;
|
||||
if (gun_meta->i->is_penetrate_thing() &&
|
||||
hit_objects_.find(obstacle->GetUniId()) != hit_objects_.end()) {
|
||||
|
@ -50,3 +50,13 @@ void DummyEntity::Initialize()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DummyEntity::OnBulletHit(Bullet* bullet)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DummyEntity::OnExplosionHit(Explosion* explosion)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -15,4 +15,7 @@ class DummyEntity : public Entity
|
||||
std::list<metatable::MapBlockJson>* blocks = nullptr;
|
||||
|
||||
virtual void Initialize() override;
|
||||
virtual void OnBulletHit(Bullet* bullet) override;
|
||||
virtual void OnExplosionHit(Explosion* explosion) override;
|
||||
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user