Skip to content

Commit

Permalink
Send ever lasting particle spawners to all players (minetest#13774)
Browse files Browse the repository at this point in the history
  • Loading branch information
chmodsayshello authored and kawogi committed Dec 19, 2023
1 parent 57fc523 commit 5660503
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1621,8 +1621,9 @@ void Server::SendAddParticleSpawner(session_t peer_id, u16 protocol_version,
) / 4.0f * BS;
const float radius_sq = radius * radius;
/* Don't send short-lived spawners to distant players.
* This could be replaced with proper tracking at some point. */
const bool distance_check = !attached_id && p.time <= 1.0f;
* This could be replaced with proper tracking at some point.
* 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) {
RemotePlayer *player = m_env->getPlayer(client_id);
Expand Down

0 comments on commit 5660503

Please sign in to comment.