mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-21 08:55:21 +01:00
Network: Batch individual particle packets (#16458)
also bumps proto ver
This commit is contained in:
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;
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user