This commit is contained in:
aozhiwei 2024-01-30 16:58:09 +08:00
parent b67245b731
commit 2b94011b01
3 changed files with 11 additions and 0 deletions

View File

@ -39,6 +39,9 @@ void GridCell::TraverseHumanList(std::function<void (Human*, bool&)> func,
if (!c->IsHuman()) {
continue;
}
if (c->IsOb()) {
continue;
}
Human* hum = (Human*)c;
func(hum, stop);
if (stop) {
@ -55,6 +58,9 @@ void GridCell::TraverseCreatures(std::function<void (Creature*, bool&)>& func,
{
++Perf::Instance()->traversing_cell_creature_count;
for (Creature* c : creatures_[room_idx]) {
if (c->IsOb()) {
continue;
}
func(c, stop);
if (stop) {
--Perf::Instance()->traversing_cell_creature_count;

View File

@ -2108,6 +2108,10 @@ void Human::PushJoinRoomMsg()
} else {
notifymsg.set_side(0);
}
if (IsOb()) {
notifymsg.set_is_viewer(1);
notifymsg.set_player_id(0);
}
GGListener::Instance()->SendToClient(socket_handle, 0, notifymsg);
#ifdef MYDEBUG
a8::XPrintf("PushJoinRooMmsg %d side:%d\n", {GetUniId(), side});

View File

@ -1723,6 +1723,7 @@ message SMMapInfo
optional int32 pve_instance_id = 16; //pve副本id
optional int32 mapid = 17; //id之后会删除
optional int32 side = 18; //moba模式出生点 0 1 2
optional int32 is_viewer = 20; //
}
//