mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
Aggregate per-entity update messages into S2CEntityUpdateBatch and broadcast once per tick. Reuse serialized packets in several broadcast loops to avoid repeated make_packet calls.
35 lines
545 B
Protocol Buffer
35 lines
545 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "common/vector3.proto";
|
|
|
|
message S2CEntityCreate {
|
|
uint64 id = 1;
|
|
string name = 2;
|
|
Vec3 pos = 3;
|
|
}
|
|
|
|
message S2CEntityDestory {
|
|
uint64 id = 1;
|
|
}
|
|
|
|
message C2SEntityDestoryRequest {
|
|
string uuid = 1;
|
|
uint64 id = 2;
|
|
}
|
|
|
|
message C2SEntityCreateRequest {
|
|
string uuid = 1;
|
|
string name = 2;
|
|
Vec3 pos = 3;
|
|
}
|
|
|
|
message S2CEntityUpdate {
|
|
uint64 id = 1;
|
|
Vec3 pos = 2;
|
|
Vec3 direction = 3;
|
|
int32 gait = 4;
|
|
}
|
|
|
|
message S2CEntityUpdateBatch {
|
|
repeated S2CEntityUpdate updates = 1;
|
|
} |