Files
Cubed/src/proto/world/entity.proto
zhenyan121 c6a75e709e perf(gameplay): batch entity updates into single packet
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.
2026-08-06 16:48:18 +08:00

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;
}