修复同步问题

This commit is contained in:
aozhiwei 2020-05-28 17:55:15 +08:00
parent 926afc2733
commit 97920b847e

View File

@ -2093,6 +2093,7 @@ void Human::ClearFrameData()
if (!a8::HasBitFlag(status, HS_Disable)) { if (!a8::HasBitFlag(status, HS_Disable)) {
for (auto& itr : out_objects) { for (auto& itr : out_objects) {
Entity* entity = room->GetEntityByUniId(itr); Entity* entity = room->GetEntityByUniId(itr);
Human* hum = (Human*)entity;
if (entity) { if (entity) {
RemovePartObjects(entity); RemovePartObjects(entity);
if (entity->entity_type == ET_Player) { if (entity->entity_type == ET_Player) {
@ -3369,6 +3370,9 @@ void Human::OnEnable()
void Human::OnDisable() void Human::OnDisable()
{ {
grid_id = 0;
grid_list.clear();
last_collision_door = nullptr;
ClearFrameData(); ClearFrameData();
ClearPartObjects(); ClearPartObjects();
} }