mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Send ever lasting particle spawners to all players (#13774)
This commit is contained in:
@@ -1621,8 +1621,9 @@ void Server::SendAddParticleSpawner(session_t peer_id, u16 protocol_version,
|
|||||||
) / 4.0f * BS;
|
) / 4.0f * BS;
|
||||||
const float radius_sq = radius * radius;
|
const float radius_sq = radius * radius;
|
||||||
/* Don't send short-lived spawners to distant players.
|
/* Don't send short-lived spawners to distant players.
|
||||||
* This could be replaced with proper tracking at some point. */
|
* This could be replaced with proper tracking at some point.
|
||||||
const bool distance_check = !attached_id && p.time <= 1.0f;
|
* A lifetime of 0 means that the spawner exists forever.*/
|
||||||
|
const bool distance_check = !attached_id && p.time <= 1.0f && p.time != 0.0f;
|
||||||
|
|
||||||
for (const session_t client_id : clients) {
|
for (const session_t client_id : clients) {
|
||||||
RemotePlayer *player = m_env->getPlayer(client_id);
|
RemotePlayer *player = m_env->getPlayer(client_id);
|
||||||
|
Reference in New Issue
Block a user