1
This commit is contained in:
parent
c053c76844
commit
bcf7da98fe
@ -50,7 +50,25 @@ void Building::FillMFObjectPart(Human* hum, cs::MFObjectPart* part_data)
|
||||
void Building::FillMFObjectFull(Human* hum, cs::MFObjectFull* full_data)
|
||||
{
|
||||
full_data->set_object_type(ET_Building);
|
||||
if (IsClientCached(hum)) {
|
||||
int object_flags = 0;
|
||||
a8::SetBitFlag(object_flags, kOfReadCache);
|
||||
full_data->set_obj_uniid(GetEntityUniId());
|
||||
full_data->set_object_flags(object_flags);
|
||||
return;
|
||||
}
|
||||
|
||||
cs::MFBuildingFull* p = full_data->mutable_union_obj_3();
|
||||
if (CanClientCache(hum)) {
|
||||
int object_flags = 0;
|
||||
a8::SetBitFlag(object_flags, kOfWriteCache);
|
||||
#if 0
|
||||
full_data->set_obj_uniid(GetEntityUniId());
|
||||
#endif
|
||||
full_data->set_object_flags(object_flags);
|
||||
AddClientCache(hum);
|
||||
}
|
||||
|
||||
p->set_obj_uniid(entity_uniid);
|
||||
TypeConvert::ToPb(pos, p->mutable_pos());
|
||||
|
||||
|
@ -105,7 +105,25 @@ void Obstacle::FillMFObjectPart(Human* hum, cs::MFObjectPart* part_data)
|
||||
void Obstacle::FillMFObjectFull(Human* hum, cs::MFObjectFull* full_data)
|
||||
{
|
||||
full_data->set_object_type(ET_Obstacle);
|
||||
if (IsClientCached(hum)) {
|
||||
int object_flags = 0;
|
||||
a8::SetBitFlag(object_flags, kOfReadCache);
|
||||
full_data->set_obj_uniid(GetEntityUniId());
|
||||
full_data->set_object_flags(object_flags);
|
||||
return;
|
||||
}
|
||||
|
||||
cs::MFObstacleFull* p = full_data->mutable_union_obj_2();
|
||||
if (CanClientCache(hum)) {
|
||||
int object_flags = 0;
|
||||
a8::SetBitFlag(object_flags, kOfWriteCache);
|
||||
#if 0
|
||||
full_data->set_obj_uniid(GetEntityUniId());
|
||||
#endif
|
||||
full_data->set_object_flags(object_flags);
|
||||
AddClientCache(hum);
|
||||
}
|
||||
|
||||
p->set_obj_uniid(entity_uniid);
|
||||
TypeConvert::ToPb(pos, p->mutable_pos());
|
||||
p->set_scale(1.0f);
|
||||
|
Loading…
x
Reference in New Issue
Block a user