1
This commit is contained in:
parent
a89dfed350
commit
3981969dfd
@ -501,6 +501,17 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
|
||||
for (auto& str : strings) {
|
||||
SendDebugMsg("数值: " + str);
|
||||
}
|
||||
} else if (cmd == "moba_pingju" && cmds.size() >= 0) {
|
||||
if (room->IsMobaModeRoom() && !room->IsGameOver()) {
|
||||
room->TraverseTeams
|
||||
(
|
||||
[] (Team* team) -> bool
|
||||
{
|
||||
team->SetKillCount(5);
|
||||
return true;
|
||||
});
|
||||
room->xtimer.Delete(room->moba_over_timer);
|
||||
}
|
||||
} else if (cmd == "findpath" && cmds.size() >= 3) {
|
||||
float x = a8::XValue(cmds[1]).GetDouble();
|
||||
float y = a8::XValue(cmds[2]).GetDouble();
|
||||
|
@ -537,6 +537,9 @@ void Team::IncKillCount()
|
||||
#endif
|
||||
++kill_count_;
|
||||
last_kill_frameno_ = room->GetFrameNo();
|
||||
if (room->IsMobaModeRoom() && room->GetMobaOvertimeRaceFrameNo() > 0) {
|
||||
room->MobaOver();
|
||||
}
|
||||
}
|
||||
|
||||
int Team::GetAlivePlayerNum()
|
||||
@ -828,3 +831,10 @@ void Team::GenRoomReportData(a8::MutableXObject* params)
|
||||
params->SetVal("pvp_team_kills", pvp_team_kills);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MYDEBUG
|
||||
void Team::SetKillCount(int count)
|
||||
{
|
||||
kill_count_ = count;
|
||||
}
|
||||
#endif
|
||||
|
@ -56,6 +56,9 @@ class Team : public std::enable_shared_from_this<Team>
|
||||
bool IsViewTeam() { return is_view_; }
|
||||
void SetViewTeam() { is_view_ = true; }
|
||||
void IncKillCount();
|
||||
#ifdef MYDEBUG
|
||||
void SetKillCount(int count);
|
||||
#endif
|
||||
int GetKillCount();
|
||||
long long GetLastKillFrameNo() { return last_kill_frameno_; }
|
||||
bool MemberHasOb();
|
||||
|
Loading…
x
Reference in New Issue
Block a user