流量优化
This commit is contained in:
parent
bcf7da98fe
commit
e55e61026b
@ -231,3 +231,4 @@ const int DEFAULT_BORN_POINT_X = 3000;
|
||||
const int DEFAULT_BORN_POINT_Y = 3000;
|
||||
|
||||
const int FIXED_OBJECT_MAXID = 1024;
|
||||
const int VIEW_RANGE = 512;
|
||||
|
@ -35,6 +35,9 @@ cs::SMUpdate* FrameMaker::MakeUpdateMsg(const Human* hum)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (((Human*)hum)->pos.ManhattanDistance(entity->pos) > VIEW_RANGE + 100) {
|
||||
continue;
|
||||
}
|
||||
entity->FillMFObjectPart((Human*)hum, msg->add_part_objects());
|
||||
}
|
||||
for (auto& itr : hum->del_objects) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user