16 Commits

Author SHA1 Message Date
Aaron Suen
a7fc1d401f Fewer, larger, less laggy tool breakage particles 2020-09-27 21:46:16 -04:00
Aaron Suen
e234033789 Make tool wear warning visual too. 2020-07-05 17:49:09 -04:00
Aaron Suen
e0156b4742 Add profiler instrumentation metadata everywhere
N.B. the MT built-in profiler doesn't yet actually support reading
labels from bare-function registrations, so a builtin hack is
needed.
2020-06-15 07:21:39 -04:00
Aaron Suen
a036f13851 Block 5.2+ redundant dig/place sounds 2020-04-05 21:36:45 -04:00
Aaron Suen
35292eb259 Switch to an internal sound API
Avoid mangling official Minetest API
functions that mods may want to
use directly.
2020-04-05 21:22:51 -04:00
Aaron Suen
d7819762e5 Full proper support for spectator mods.
If players are invisible, NodeCore will not add any visible or
audible effects for them, allowing such players to be completely
non-interactive with gameplay.

This allows things like spectator or stealth-admin mods to
function properly.
2019-12-11 06:52:09 -05:00
Aaron Suen
05c60e031a Attach wielded item sounds to moving player. 2019-09-12 20:20:59 -04:00
Aaron Suen
39dea8a2ae MAJOR: Code quality audit using luacheck.
- Removed lots of unused variables, a few shadowed identifiers.
- Removed a few sections of dead code.
2019-08-31 09:26:53 -04:00
Aaron Suen
c1828219e6 Refactor social sounds subsystem.
Standardize the "play a sound for everybody except the player who
is already playing it client-locally" logic into one place.

Fix failure to correctly detect tool speeds for some things, i.e.
when the player is using a tool but the capability used on a node
is actually inherited from the hand.

Note that this may allow pummeling with wrong tools (e.g. repacking
soils with spades) along with accompanying inappropriate tool wear,
but this should be minor and avoidable, and can be fixed later...
2019-04-06 23:51:05 -04:00
Aaron Suen
eba101c93a Fix sound doubling issues. 2019-04-06 23:42:23 -04:00
Aaron Suen
617aa4704f Dug sounds for old node, not new. 2019-04-06 21:28:11 -04:00
Aaron Suen
fe727d0145 Social digging/placing sounds.
Normally these play only locally for the client doing the
digging/placing.  Explicitly play them to other nearby clients.
2019-04-06 20:14:04 -04:00
Aaron Suen
507f5ae98e Sounds for tools wearing out and breaking. 2019-04-01 00:39:30 -04:00
Aaron Suen
27770dfdb7 Try to fix stack node sounds.
Use same node_sound hook as punch hook, to limit sound rate.
2019-03-16 17:10:20 -04:00
Aaron Suen
38833a90a7 Limit punch sound interval. 2019-03-14 22:04:44 -04:00
Aaron Suen
2f3d2afff5 Sounds on tapping/pummeling nodes. 2019-03-14 21:48:29 -04:00