This commit is contained in:
aozhiwei 2023-11-24 21:57:36 +08:00
parent 55cf1fa800
commit e23fe79136
3 changed files with 3 additions and 10 deletions

View File

@ -90,8 +90,6 @@ execute_process(
COMMAND touch -a ss_proto.pb.cc
COMMAND touch -a ss_msgid.pb.h
COMMAND touch -a ss_msgid.pb.cc
COMMAND touch -a navmesh.pb.h
COMMAND touch -a navmesh.pb.cc
)
aux_source_directory(.
SRC_LIST
@ -108,7 +106,7 @@ add_executable(
add_custom_target(script_pb_protocol ALL)
add_custom_command(TARGET script_pb_protocol
PRE_BUILD
COMMAND python ../../third_party/tools/scripts/construct/build_pb.py --cpp_out=. --pb_files=cs_proto,cs_msgid,ss_proto,ss_msgid,navmesh --python_out=../tools/robot/virtualclient
COMMAND python ../../third_party/tools/scripts/construct/build_pb.py --cpp_out=. --pb_files=cs_proto,cs_msgid,ss_proto,ss_msgid --python_out=../tools/robot/virtualclient
)
add_dependencies(robot${GAME_ID} script_pb_protocol)

View File

@ -40,6 +40,7 @@ void PlayerMgr::Update()
}
}
#if 0
void PlayerMgr::CoWebLogin(int idx, f8::Coroutine* co)
{
std::string account_id;
@ -116,6 +117,7 @@ void PlayerMgr::CoCreatePlayer(f8::Coroutine* co,
account_id_hash_[hum->GetAccountId()] = hum;
socket_id_hash_[hum->GetSocketId()] = hum;
}
#endif
std::shared_ptr<Player> PlayerMgr::GetPlayerByAccountId(const std::string& account_id)
{

View File

@ -20,13 +20,6 @@ class PlayerMgr : public a8::Singleton<PlayerMgr>
std::shared_ptr<Player> GetPlayerByAccountId(const std::string& account_id);
std::shared_ptr<Player> GetPlayerBySocketHandle(int socket_handle);
private:
void CoWebLogin(int idx, f8::Coroutine* co);
void CoCreatePlayer(f8::Coroutine* co,
int idx,
const std::string& account_id,
const std::string& session_id);
private:
std::map<int, std::shared_ptr<Player>> socket_id_hash_;
std::map<std::string, std::shared_ptr<Player>> account_id_hash_;