Any particle spawners with time > 1 or equal to 0 are sent to all clients. #6556

Open
opened 2024-03-23 19:01:51 +00:00 by whosit · 4 comments
Member

This causes each active nether portal with time == 2 or petz with time == 1.5 spam every player. It's around 6 packets per second for each active portal on the server...

This is because distance check only done for spawners with emission time less or equal to 1 second:
https://github.com/minetest/minetest/blob/master/src/server.cpp#L1610

We could fix every mod that creates these "long" spawners, or we could just patch this check in C++ and increase it to largest spawner duration that our mods use - which seems to be easier...

As comment in C++ code mentions, the real fix is to track active spawners and check when players move close to them, but that won't happen soon...

Originally discovered by AspireMint.

This causes each active nether [portal](https://github.com/minetest-mods/nether/blob/d16b530685d62f6891d8f4d537bf36acf842a077/portal_api.lua#L1534) with time == 2 or petz with time == 1.5 spam every player. It's around 6 packets per second for each active portal on the server... This is because distance check only done for spawners with emission time less or equal to 1 second: https://github.com/minetest/minetest/blob/master/src/server.cpp#L1610 We could fix every mod that creates these "long" spawners, or we could just patch this check in C++ and increase it to largest spawner duration that our mods use - which seems to be easier... As comment in C++ code mentions, the real fix is to track active spawners and check when players move close to them, but that won't happen soon... Originally discovered by AspireMint.
whosit added the
3. source/mod upstream
3. source/engine
labels 2024-03-23 19:01:51 +00:00
flux added the
1. kind/bug
label 2024-03-25 23:48:27 +00:00
Member

audit:

  • abriflame: spawners are immortal
  • abritorch: time = 1
  • airutils: smoke particle spawners are immortal; others <= 1
  • anvil: time < 1
  • ballistics: time < 1
  • bonemeal: time < 1
  • cannons: time < 1
  • confetti: time < 1
  • emoji: time < 1
  • fireworks_redo: time < 1
  • mobs_balrog: time <= 1
  • mobs_monster: time < 1
  • mobs_redo: time < 1
  • nether: fumarole smoke > 1; portal > 1 (i've actually noticed these from way too far away before, no wonder); others <= 1
  • petz: anything invoked by petz.do_particles_effect > 1; others < 1
  • spawnit: spawners are immortal, but only used by debugging commands
  • stamina: time < 1
  • tnt: time < 1
  • water_life: time == 1
  • yl_church: time > 1
  • yl_commons: code copied from nether fumaroles; cutie functions have some > 1
  • yl_dice: time < 1
  • yl_events: time < 1
  • yl_fireplace: some times > 1; others < 1
  • yl_nether: some times > 1; others < 1
  • yl_statuseffects: times < 1
audit: * abriflame: **_spawners are immortal_** * abritorch: time = 1 * airutils: **_smoke particle spawners are immortal_**; others <= 1 * anvil: time < 1 * ballistics: time < 1 * bonemeal: time < 1 * cannons: time < 1 * confetti: time < 1 * emoji: time < 1 * fireworks_redo: time < 1 * mobs_balrog: time <= 1 * mobs_monster: time < 1 * mobs_redo: time < 1 * nether: **_fumarole smoke > 1_**; **_portal > 1_** (i've actually noticed these from way too far away before, no wonder); others <= 1 * petz: **_anything invoked by `petz.do_particles_effect` > 1_**; others < 1 * spawnit: **_spawners are immortal, but only used by debugging commands_** * stamina: time < 1 * tnt: time < 1 * water_life: time == 1 * yl_church: **_time > 1_** * yl_commons: **_code copied from nether fumaroles_**; **_`cutie` functions have some > 1_** * yl_dice: time < 1 * yl_events: time < 1 * yl_fireplace: **_some times > 1_**; others < 1 * yl_nether: **_some times > 1_**; others < 1 * yl_statuseffects: times < 1
Member

tangent: does anyone know how i can color text in a list in gitea? there's some things like e.g.

{\color{red}red}

but that doesn't seem to work in a list, only on its own line or in a table, and it seems to lose spaces.

tangent: does anyone know how i can color text in a list in gitea? there's some things like e.g. $${\color{red}red}$$ but that doesn't seem to work in a list, only on its own line or in a table, and it seems to lose spaces.
Member

here's the issue which resulted in the current behavior (it was worse before) https://github.com/minetest/minetest/issues/5667

here's the issue which resulted in the current behavior (it was worse before) https://github.com/minetest/minetest/issues/5667
Member
seems that's not the only relevant thing, there's also https://github.com/minetest/minetest/issues/9840 and https://github.com/minetest/minetest/pull/13774
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#6556
No description provided.