This commit is contained in:
aozhiwei 2023-12-28 11:52:07 +08:00
parent 8be61c1810
commit 8b477e257d
4 changed files with 25 additions and 10 deletions

View File

@ -85,16 +85,14 @@ void Android::Update(int delta_time)
}
}
#ifdef MYDEBUG
if (room->BattleStarted()) {
if (!dead &&
room->debug_params.find(119) != room->debug_params.end()) {
BeKill(VP_Gas,
TEXT("battle_server_killer_gas", "毒圈"),
VW_Gas,
VP_Gas,
TEXT("battle_server_killer_gas", "毒圈"));
a8::UnSetBitFlag(status, CS_Disable);
}
if (!dead &&
room->debug_params.find(119) != room->debug_params.end()) {
BeKill(VP_Gas,
TEXT("battle_server_killer_gas", "毒圈"),
VW_Gas,
VP_Gas,
TEXT("battle_server_killer_gas", "毒圈"));
a8::UnSetBitFlag(status, CS_Disable);
}
#endif
InternalUpdate(delta_time);

View File

@ -86,6 +86,15 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
} else if (cmd == "chiji") {
#if MYDEBUG
room->debug_params[119] = 1;
room->xtimer.SetTimeoutEx
(1,
[this] (int event, const a8::Args* args)
{
if (a8::TIMER_EXEC_EVENT == event) {
room->GetIncubator()->ShowHand();
}
},
&xtimer_attacher);
#endif
} else if (cmd == "add_hp") {
if (cmds.size() > 1) {

View File

@ -252,7 +252,11 @@ void Incubator::AutoAllocAndroid()
case GasWaiting:
case GasMoving:
{
#if 1
if (!hold_humans_.empty() && hold_humans_.size() > 0) {
#else
if (!hold_humans_.empty() && hold_humans_.size() > 6) {
#endif
Human* hum = hold_humans_[0];
if (room->GetGasData().GetGasMode() == GasWaiting &&
hold_humans_.size() > 1 &&

View File

@ -2252,6 +2252,10 @@ int Room::InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<c
moba_teams.push_back(team);
return true;
});
if (moba_teams.size() < 1 ||
moba_teams.size() > 2) {
abort();
}
p->TraverseMemberList
(
[p, msg, ip_saddr, socket_handle] (MobaMember* m) -> bool