修复打人不掉血问题

This commit is contained in:
aozhiwei 2019-08-01 18:22:41 +08:00
parent c25bb87fc1
commit a8af7f5178

View File

@ -798,6 +798,7 @@ bool Room::GenSmallCircle(a8::Vec2 big_circle_pos, float big_circle_rad, float s
void Room::MatchTeam(Human* hum) void Room::MatchTeam(Human* hum)
{ {
#if 0
for (auto& pair : human_hash_) { for (auto& pair : human_hash_) {
if (pair.second != hum) { if (pair.second != hum) {
if (!hum->team_uuid.empty() && pair.second->team_uuid == hum->team_uuid) { if (!hum->team_uuid.empty() && pair.second->team_uuid == hum->team_uuid) {
@ -815,6 +816,7 @@ void Room::MatchTeam(Human* hum)
} }
} }
} }
#endif
if (hum->team_id == 0) { if (hum->team_id == 0) {
hum->team_id = NewTeam(); hum->team_id = NewTeam();
hum->team_members = &team_hash_[hum->team_id]; hum->team_members = &team_hash_[hum->team_id];