mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-05 19:31:04 +00:00
Network: Batch individual particle packets (#16458)
also bumps proto ver
This commit is contained in:
parent
4c29bf6923
commit
5f5ea13251
9 changed files with 116 additions and 51 deletions
12
src/server.h
12
src/server.h
|
@ -605,9 +605,11 @@ private:
|
|||
|
||||
void SendDeleteParticleSpawner(session_t peer_id, u32 id);
|
||||
|
||||
// Spawns particle on peer with peer_id (PEER_ID_INEXISTENT == all)
|
||||
void SendSpawnParticle(session_t peer_id, u16 protocol_version,
|
||||
const ParticleParameters &p);
|
||||
// Spawn particles for a specific client, batching them if clients support it.
|
||||
void SendSpawnParticles(RemotePlayer *player,
|
||||
const std::vector<ParticleParameters> &particles);
|
||||
// Spawn all particles for this step, batching them if clients support it.
|
||||
void SendSpawnParticles();
|
||||
|
||||
void SendActiveObjectRemoveAdd(RemoteClient *client, PlayerSAO *playersao);
|
||||
void SendActiveObjectMessages(session_t peer_id, const std::string &datas,
|
||||
|
@ -805,6 +807,10 @@ private:
|
|||
MetricCounterPtr m_packet_recv_counter;
|
||||
MetricCounterPtr m_packet_recv_processed_counter;
|
||||
MetricCounterPtr m_map_edit_event_counter;
|
||||
|
||||
// Particles to send this server step
|
||||
// [playername] = list of params, empty playername for broadcast
|
||||
std::unordered_map<std::string, std::vector<ParticleParameters>> m_particles_to_send;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue