修复队友全死后不发GameOver问题
This commit is contained in:
parent
30d33f97ab
commit
f0fb944f7e
@ -252,6 +252,21 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
|
|||||||
room->grid_service->MoveCreature(hum);
|
room->grid_service->MoveCreature(hum);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
} else if (cmd == "dead_teammate") {
|
||||||
|
GetTeam()->TraverseMembers
|
||||||
|
(
|
||||||
|
[this] (Human* hum) -> bool
|
||||||
|
{
|
||||||
|
if (hum != this && !hum->dead) {
|
||||||
|
hum->BeKill(VP_Gas,
|
||||||
|
TEXT("battle_server_killer_gas", "毒圈"),
|
||||||
|
VW_Gas,
|
||||||
|
VP_Gas,
|
||||||
|
TEXT("battle_server_killer_gas", "毒圈"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
} else if (cmd == "total_lucky") {
|
} else if (cmd == "total_lucky") {
|
||||||
SendDebugMsg(a8::Format("total_lucky:%f", {GetNetData()->GetTotalLucky()}));
|
SendDebugMsg(a8::Format("total_lucky:%f", {GetNetData()->GetTotalLucky()}));
|
||||||
} else if (cmd == "randomobj" && cmds.size() >= 2) {
|
} else if (cmd == "randomobj" && cmds.size() >= 2) {
|
||||||
|
@ -1281,6 +1281,9 @@ void Human::OnDie()
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (IsPlayer()) {
|
||||||
|
int i = 0;
|
||||||
|
}
|
||||||
if (real_dead) {
|
if (real_dead) {
|
||||||
std::set<Human*> over_humans;
|
std::set<Human*> over_humans;
|
||||||
if (!leave_) {
|
if (!leave_) {
|
||||||
|
@ -1539,6 +1539,9 @@ void Human::SendUpdateMsg()
|
|||||||
|
|
||||||
void Human::SendGameOver()
|
void Human::SendGameOver()
|
||||||
{
|
{
|
||||||
|
if (IsPlayer()){
|
||||||
|
int i = 0;
|
||||||
|
}
|
||||||
CalcStats();
|
CalcStats();
|
||||||
if (stats->abandon_battle == 1 || (GetTeam()->HasPlayer()) || GetTeam()->MemberHasOb()) {
|
if (stats->abandon_battle == 1 || (GetTeam()->HasPlayer()) || GetTeam()->MemberHasOb()) {
|
||||||
if (room->IsAlreadyRoomReportBattle()) {
|
if (room->IsAlreadyRoomReportBattle()) {
|
||||||
@ -1565,7 +1568,8 @@ void Human::SendGameOver()
|
|||||||
sent_personal_report_ = true;
|
sent_personal_report_ = true;
|
||||||
}
|
}
|
||||||
if (GetTeam()->team_rank && GetTeam()->HasPlayer() && !GetTeam()->IsViewTeam() &&
|
if (GetTeam()->team_rank && GetTeam()->HasPlayer() && !GetTeam()->IsViewTeam() &&
|
||||||
stats->abandon_battle != 1 && !room->IsMobaModeRoom()) {
|
stats->abandon_battle != 1 && !room->IsMobaModeRoom() &&
|
||||||
|
!GetTeam()->IsAlreadyReportBattle()) {
|
||||||
GetTeam()->TrySendTeamBattleReport(this);
|
GetTeam()->TrySendTeamBattleReport(this);
|
||||||
} else {
|
} else {
|
||||||
cs::SMGameOver msg;
|
cs::SMGameOver msg;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user