修复 全量信息同步问题
This commit is contained in:
parent
62e659e4b2
commit
b535db5f62
@ -18,9 +18,6 @@ void FrameData::ClearFrameData(Human* hum)
|
||||
if (entity->IsEntityType(ET_Player)) {
|
||||
((Human*)entity)->RemovePartObjects(hum);
|
||||
}
|
||||
#ifdef DEBUG1
|
||||
room->CheckPartObjects();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -36,9 +33,6 @@ void FrameData::ClearFrameData(Human* hum)
|
||||
((Human*)entity)->RemovePartObjects(hum);
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG1
|
||||
room->CheckPartObjects();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
out_objects.clear();
|
||||
|
@ -2392,6 +2392,19 @@ void Human::NotifyObservers(cs::SMUpdate* msg, cs::MFActivePlayerData* active_pl
|
||||
}
|
||||
}
|
||||
refreshed_view = true;
|
||||
for (auto& pair : framedata_.part_objects) {
|
||||
if (synced_objects.find(pair.second.entity_uniid) == synced_objects.end()) {
|
||||
Entity* entity = room->GetEntityByUniId(pair.second.entity_uniid);
|
||||
if (entity) {
|
||||
entity->FillMFObjectFull(room, this, msg->add_full_objects());
|
||||
synced_objects.insert(entity->GetUniId());
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
abort();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
observer->follow_synced_active_player = true;
|
||||
} else {
|
||||
|
@ -2299,7 +2299,7 @@ long long Room::GetGasInactiveTime()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
return App::Instance()->debug_params.find(1) != App::Instance()->debug_params.end() ?
|
||||
App::Instance()->debug_params[1] : 20;
|
||||
App::Instance()->debug_params[1] : 10;
|
||||
#endif
|
||||
{
|
||||
if (room_type_ == RT_NewBrid) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user