This commit is contained in:
aozhiwei 2020-07-20 17:57:46 +08:00
parent 14ed14f067
commit c76b11503c

View File

@ -6,6 +6,7 @@
#include "building.h"
#include "human.h"
#include "app.h"
#include "obstacle.h"
Entity::Entity()
{
@ -135,6 +136,10 @@ bool Entity::IsClientCached(Human* hum)
bool Entity::CanClientCache(Human* hum)
{
ObjectSyncFlags* sync_flags = hum->GetObjectSyncFlags(GetEntityUniId());
if (sync_flags && entity_type == ET_Obstacle) {
Obstacle* obstacle = (Obstacle*)this;
return !obstacle->is_door;
}
return sync_flags != nullptr;
}