修复救人bug

This commit is contained in:
aozhiwei 2019-04-17 13:40:41 +08:00
parent 6c0c60f289
commit ef26f6e56a
2 changed files with 9 additions and 1 deletions

View File

@ -487,6 +487,14 @@ void Human::BeKill(int killer_id, const std::string& killer_name)
send_gameover = true; send_gameover = true;
room->OnHumanDie(this); room->OnHumanDie(this);
SyncAroundPlayers(); SyncAroundPlayers();
if (team_members) {
for (auto& hum : *team_members) {
if (hum != this && hum->action_type == AT_Relive &&
hum->action_target_id == entity_uniid) {
hum->CancelAction();
}
}
}
} }
} }

View File

@ -267,7 +267,7 @@ void Player::UpdateAction()
room->xtimer.DeleteTimer(hum->downed_timer); room->xtimer.DeleteTimer(hum->downed_timer);
hum->downed_timer = nullptr; hum->downed_timer = nullptr;
} }
SyncAroundPlayers(); hum->SyncAroundPlayers();
} }
} }
break; break;