Skip to content

[no squash] Make node break particles visible to all players - #16472

Merged
sfan5 merged 2 commits into
luanti-org:masterfrom
sfan5:breakparticle
Sep 10, 2025
Merged

sfan5 merged 2 commits into
luanti-org:masterfrom
sfan5:breakparticle

Conversation

@sfan5

@sfan5 sfan5 commented Sep 5, 2025 •

Copy link
Copy Markdown
Member

for some reason I thought we had this already. but we don't.
so we have it now.

Q: But what about compatibility? how do I disable this?
A: You don't, but this already applies to the client-side particles and is a separate FR (#15423).

this feature works server-side only btw.

To do

This PR is Ready for Review.

How to test

  1. join second player to a server
  2. have second player dig nodes
  3. make sure first player can see the nodes breaking

@sfan5 sfan5 added @ Script API @ Client / Audiovisuals Feature ✨ PRs that add or enhance a feature labels Sep 5, 2025
@sfan5 sfan5 changed the title [no squash] Send node dig particles to all players in the server [no squash] Send node break particles to all players Sep 5, 2025
@sfan5 sfan5 changed the title [no squash] Send node break particles to all players [no squash] Make node break particles visible to all players Sep 5, 2025
@SmallJoker

Copy link
Copy Markdown
Member

Couldn't exclude_player be added to ParticleSpawnerParameters? It seems to me that most (if not all?) Lua fields should be represented in that struct.

@sfan5

sfan5 commented Sep 5, 2025

Copy link
Copy Markdown
Member Author

Well the player names are not transferred over the network as part of the struct so they're technically out of place in ParticleSpawnerParameters.

Comment thread builtin/game/item.lua
minsize = 0, maxsize = 0, -- random
node = node,
blend = (def and def.use_texture_alpha == "blend") and "blend" or "clip",
exclude_player = diggername,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps naive question, why not use particle spawner for all players (include the digging player) and get rid of the local digging particles?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latency and the weird compatibility mess that would be required to not show too many particles on older clients.

@lhofhansl lhofhansl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried it. Works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants