diff --git a/server/gameserver/obstacle.cc b/server/gameserver/obstacle.cc index da739ba..d730135 100644 --- a/server/gameserver/obstacle.cc +++ b/server/gameserver/obstacle.cc @@ -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()); }