This commit is contained in:
aozhiwei 2019-07-15 09:52:11 +08:00
parent c96b587833
commit 35aed66b55

View File

@ -113,34 +113,27 @@ void Bullet::ProcBomb()
std::set<Entity*> objects; std::set<Entity*> objects;
for (auto& grid : grid_list) { for (auto& grid : grid_list) {
for (Human* hum: grid->human_list) { for (Human* hum: grid->human_list) {
#if 1 if (TestCollision(hum)) {
{ objects.insert(hum);
#else }
if (hum != player && }
(hum->team_id == 0 || player->team_id != hum->team_id)) { for (Entity* entity : grid->entity_list) {
#endif switch (entity->entity_type) {
if (TestCollision(hum)) { case ET_Obstacle:
objects.insert(hum); case ET_Building:
{
if (TestCollision(entity)) {
objects.insert(entity);
} }
} }
} break;
for (Entity* entity : grid->entity_list) { default:
switch (entity->entity_type) { {
case ET_Obstacle:
case ET_Building:
{
if (TestCollision(entity)) {
objects.insert(entity);
}
}
break;
default:
{
}
break;
} }
break;
} }
}//end for }
}//end for
room->RemoveObjectLater(this); room->RemoveObjectLater(this);
} }