1
This commit is contained in:
commit
784eee247e
@ -2241,6 +2241,9 @@ void Human::ReJoin(long ip_saddr, int socket_handle, std::shared_ptr<cs::CMJoin>
|
|||||||
Human* target = target_list.at(rand() % target_list.size());
|
Human* target = target_list.at(rand() % target_list.size());
|
||||||
FollowTarget(target);
|
FollowTarget(target);
|
||||||
target->StartRefreshViewTimer();
|
target->StartRefreshViewTimer();
|
||||||
|
cs::SMWatchTarget rsp_msg;
|
||||||
|
rsp_msg.set_target_uniid(target->GetUniId());
|
||||||
|
SendNotifyMsg(rsp_msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SendViewerUiNotify();
|
SendViewerUiNotify();
|
||||||
|
@ -39,3 +39,12 @@ void RoomOb::SendViewerUiMemberUpdate(std::vector<int> member_ids)
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RoomOb::TraverseOb(std::function<bool (Player*)> cb)
|
||||||
|
{
|
||||||
|
for (auto& pair : id_hash_) {
|
||||||
|
if (!cb(pair.second)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -15,6 +15,7 @@ class RoomOb : public std::enable_shared_from_this<RoomOb>
|
|||||||
Player* GetByAccountId(const std::string& account_id);
|
Player* GetByAccountId(const std::string& account_id);
|
||||||
void AddOb(Player* hum);
|
void AddOb(Player* hum);
|
||||||
void SendViewerUiMemberUpdate(std::vector<int> member_ids);
|
void SendViewerUiMemberUpdate(std::vector<int> member_ids);
|
||||||
|
void TraverseOb(std::function<bool (Player*)> cb);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Room* room_ = nullptr;
|
Room* room_ = nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user