This commit is contained in:
aozhiwei 2019-04-17 11:51:27 +08:00
parent 5a281bf4f1
commit 75b60a46ba

View File

@ -360,8 +360,12 @@ void Room::CollisionDetection(Entity* sender, int detection_flags, std::vector<E
if (sender->entity_type == ET_Bullet) {
Bullet* bullet = (Bullet*)sender;
Human* hum = (Human*)pair.second;
#if 1
if (hum != bullet->player) {
#else
if (hum != bullet->player &&
(hum->team_id == 0 || bullet->player->team_id != hum->team_id)) {
#endif
if (bullet->TestCollision(hum)) {
objects.push_back(hum);
}