1
This commit is contained in:
parent
9a5a7db411
commit
7ec616edd4
@ -193,6 +193,31 @@ void RoomObstacle::SpecExplosion()
|
||||
meta->i->explosion_effect(),
|
||||
meta->i->damage()
|
||||
);
|
||||
{
|
||||
std::set<Human*> human_list;
|
||||
room->grid_service->TraverseAllLayerHumanList
|
||||
(room->GetRoomIdx(),
|
||||
*grid_list_,
|
||||
[this, &human_list] (Human* hum, bool& stop)
|
||||
{
|
||||
if (master.Get()->team_id != hum->team_id && TestCollision(room, hum)) {
|
||||
human_list.insert(hum);
|
||||
}
|
||||
}
|
||||
);
|
||||
if (!human_list.empty()) {
|
||||
for (Human* hum : human_list) {
|
||||
for (int buff_id : meta->buff_list) {
|
||||
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);
|
||||
if (buff_meta) {
|
||||
hum->AddBuff(master.Get(),
|
||||
buff_meta,
|
||||
1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
int total_explosion_times = meta->i->explosion_times();
|
||||
@ -219,16 +244,12 @@ void RoomObstacle::Active()
|
||||
break;
|
||||
case kObstacleMine:
|
||||
{
|
||||
#if 0
|
||||
ActiveMine();
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case kObstacleTrap:
|
||||
{
|
||||
#if 0
|
||||
ActiveTrap();
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case kObstaclePosionGas:
|
||||
|
Loading…
x
Reference in New Issue
Block a user