汽油桶打爆了,没有召唤燃烧弹
This commit is contained in:
parent
9ca49272d4
commit
3c108eadad
@ -513,6 +513,17 @@ void Obstacle::OnBulletHit(Bullet* bullet)
|
|||||||
if (IsDead(bullet->room)) {
|
if (IsDead(bullet->room)) {
|
||||||
ProcDieExplosion(bullet->room);
|
ProcDieExplosion(bullet->room);
|
||||||
bullet->sender.Get()->DropItems(this);
|
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);
|
BroadcastFullState(bullet->room);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -556,6 +567,17 @@ void Obstacle::OnExplosionHit(Explosion* e)
|
|||||||
if (meta->i->drop() != 0) {
|
if (meta->i->drop() != 0) {
|
||||||
e->GetRoom()->ScatterDrop(GetPos(), meta->i->drop());
|
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());
|
BroadcastFullState(e->GetRoom());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user