汽油桶打爆了,没有召唤燃烧弹

This commit is contained in:
aozhiwei 2021-06-25 20:47:38 +08:00
parent 9ca49272d4
commit 3c108eadad

View File

@ -513,6 +513,17 @@ void Obstacle::OnBulletHit(Bullet* bullet)
if (IsDead(bullet->room)) {
ProcDieExplosion(bullet->room);
bullet->sender.Get()->DropItems(this);
if (meta->i->thing_type() == kObstacleOilBucket) {
MetaData::MapThing* bomb_meta = MetaMgr::Instance()->GetMapThing(meta->int_param1);
if (bomb_meta) {
RoomObstacle* obstacle = bullet->room->CreateObstacle
(
bomb_meta->i->thing_id(),
GetPos().x,
GetPos().y
);
}
}
}
BroadcastFullState(bullet->room);
#ifdef DEBUG
@ -556,6 +567,17 @@ void Obstacle::OnExplosionHit(Explosion* e)
if (meta->i->drop() != 0) {
e->GetRoom()->ScatterDrop(GetPos(), meta->i->drop());
}
if (meta->i->thing_type() == kObstacleOilBucket) {
MetaData::MapThing* bomb_meta = MetaMgr::Instance()->GetMapThing(meta->int_param1);
if (bomb_meta) {
RoomObstacle* obstacle = e->GetRoom()->CreateObstacle
(
bomb_meta->i->thing_id(),
GetPos().x,
GetPos().y
);
}
}
}
BroadcastFullState(e->GetRoom());
}