diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index c958d0ea..c104e188 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -2225,30 +2225,30 @@ void Room::RandRemoveAndroid() if (hum->GetBornPoint()) { DecBornPointHumanNum(hum->GetBornPoint(), hum); } + if (!hum->IsOb()) { + DecAliveCount(); + } + TraverseRawHumanList + ( + [hum] (Human* ele_hum) -> bool + { + ele_hum->RemovePartObjects(hum); + return true; + }); + TraverseRawHumanList + ( + [hum] (Human* ele_hum) -> bool + { + ele_hum->RemoveObjects(hum); + return true; + }); + frame_event.AddExitGame(hum->GetWeakPtrRef()); grid_service->DeatchHuman(hum); RemoveFromMoveableHash(hum); RemoveFromEntityHash(hum); RemoveFromHuamnHash(hum); RemoveFromAliveHumanHash(hum); AddToRemovedRobotHash(hum); - if (!hum->IsOb()) { - DecAliveCount(); - } - TraverseRawHumanList - ( - [] (Human* ele_hum) -> bool - { - ele_hum->RemovePartObjects(ele_hum); - return true; - }); - TraverseRawHumanList - ( - [] (Human* ele_hum) -> bool - { - ele_hum->RemoveObjects(ele_hum); - return true; - }); - frame_event.AddExitGame(hum->GetWeakPtrRef()); } } diff --git a/server/robotserver/android_agent.cc b/server/robotserver/android_agent.cc index e2c056a6..864740eb 100644 --- a/server/robotserver/android_agent.cc +++ b/server/robotserver/android_agent.cc @@ -203,7 +203,7 @@ behaviac::EBTStatus AndroidAgent::CoJoin() msg.set_auto_fill(1); msg.set_name(""); msg.set_avatar_url(""); - msg.set_mapid(2002); + msg.set_mapid(2001); msg.set_hero_id(30800); //weapons msg.set_session_id(owner_->GetSessionId()); @@ -255,11 +255,12 @@ behaviac::EBTStatus AndroidAgent::CoUpdateGame() cs::CMMove msg; ToPb(curr_dir_, msg.mutable_move_dir()); ToPb(curr_dir_, msg.mutable_attack_dir()); + msg.set_emote(200001); + msg.set_shot_start(1); + msg.set_shot_hold(1); if (sand_table_target_pos) { ToPb(*sand_table_target_pos.get(), msg.mutable_sand_table_target_pos()); } - msg.set_shot_start(1); - msg.set_shot_hold(1); owner_->SendMsg(msg); } { diff --git a/server/robotserver/playermgr.cc b/server/robotserver/playermgr.cc index 604125ae..bd140632 100644 --- a/server/robotserver/playermgr.cc +++ b/server/robotserver/playermgr.cc @@ -32,7 +32,7 @@ void PlayerMgr::Init() account_id_hash_[hum->GetAccountId()] = hum; socket_id_hash_[hum->GetSocketId()] = hum; ++count; - if (count >= 2000) { + if (count >= 200) { f8::Timer::Instance()->DeleteCurrentTimer(); } }