Some time ago, we were "labeling" callbacks so that we could use
a specially modified profiler to identify time spent per specific
callback. This became largely unnecessary thanks to the
jitprofiler mod, which shows specific line numbers anyway. Now,
the labeling has actually even broken because it interferes with
MT's newest built-in instrumentation, which expects functions, not
callable tables. Since the indirection wasn't helping, and could
only have caused some small performance costs anyway, we might as
well just remove it instead of trying to make it work.
Unfortunately "labeled" callbacks were all over the game, so now
these all have to be removed...
If the player somehow gets beyond map_limit, allow push-out to
work, but continue to treat ignores inside map_limit as non-solid
until they can finish being loaded.
Just hold the zoom button for a couple of seconds
(gives the player a chance to take screenshots with
the fixed zoom level) and then progressive zoom will
kick in automatically as long as zoom and no other
input control is held down.
This also prevents problems with the sneak/aux
causing unwanted movement while zooming.
- Pick up and carry hot lode things
- Sane tool wear management
Known Issues:
- No recipes yet
- Glowing things don't anneal/temper when inside
player inventory
Players still need to enable some settings:
- Enable shaders in Settings
- Hunt for "auto exposure" in advanced settings and enable it
The game will try to adjust the brightness automatically based on
the local light level. Unfortunately there are problems with it
(e.g. it seems to detect light based on the light level where you
are standing instead of where you're looking) but it may help
improve the "caving" experience without having to mess with gamma
curves.
Players can use sneak and/or aux1 for far-zooming, so they can
far-zoom while treading water in an ocean to look at distant
islands, instead of using the aux1=climb down hack, which causes
all sorts of weird issues with other features that try to detect
movement controls
Pointable/"viscous" liquids are "solid" when present at the head
location, but not at the feet location, so that players can still
wade on the surface of these liquids.
If the liquid is "pointable" then it can block players from being
able to emergency-dig the container; in these cases, just push the
player out immedately. This should only apply to some liquids
like pumwater, molten glass, or concrete.
Instead of caching privs only for the current tick, and only for
NodeCore itself, change the base API to use caching universally,
including for naive mod code. Privs are cached until invalidated
by a change; it's assumed here that the "auth_reload" command
exists in the first place because this kind of caching is allowed
and accounted for, even if it's not actually done by the engine
or builtin.
All base-game priv checks should now only
require one priv lookup per player per tick,
except in special cases where a player's privs
changed during that tick.
This gets rid of the 5.4+ "deprecated get_player_velocity" warning
and modernizes the code to use get_velocity() everywhere, while
still remaining compatible with 5.3 for now (tested). The polyfill
had to be on joinplayer because the nc_player_pickup auto-one-time
method of using after() won't reliably patch the player before some
other globalstep tries to read player velocity.
When MT 5.5 is released and 5.3 support ends, the polyfill just
needs to be removed to clean it up.
Also tidied up and consistentized the logging for other hooks.
Apparently "rounding error" margin for the bounding box for feet
was too large for MT to detect player's feet on the ground.
Shrink it to a very small amount that should be large enough not
to be lost in rounding error but small enough to allow footstep
sounds.
- This nudges the player upward a bit and gets the
feet of the model out of the ground.
- This also compensates for a rounding issue that
causes players to be detected as stuck in the
node below their feet instead of the space above
it. The old workaround worked for pushout but
didn't help with mods like ziprunes.
- Run all settings through a common API.
- Use modname prefix consistently for setting
keys instead of "nodecore".
- Add automatic dumping of settingtypes.txt
metadata for maintenance.
- Include initial settingtypes.txt for game for
main menu use.
- Remove per-recipe tuning for pummel recipes,
as there were way too many of those to be
possibly useful and it was clogging up the
settings menu. Use tool rate adjustments to
control it instead.
- Remove vestigial enable_damage setting.
Described in player guide "movement" tab.
It's analogous to the old "/stuck" command that
was removed once long ago, but much more
tedious to execute, so players still have an
incentive to extricate themselves manually.
Old behavior used to round exactly-off-by-half
values up toward +inf, but since
https://github.com/minetest/minetest/pull/10803
they are rounded toward +/-inf, which means that
if a player's y coord was exactly -1.5, it used to
round up to -1.0 but now rounds down to -2.0.
This affects using vector.round to get the pos of
the node the player's feet are standing INSIDE,
because if the player's y coord is exactly -0.5, as
would happen while they're standing perfectly at
rest on top of a node, it will instead give us the
node they're standing ON.
This causes spurious player "pushout" events,
because the game thinks players are standing
inside the node they're actually standing on top
of.
To work around this, just add a small positive
fudge factor to the player's y coord to bias it
toward +inf.
A low-level player teleportation must be explicitly
declared nodecorian via a keepinv property on
the position, or the player must be exempted via
the keepinv priv, to be allowed to teleport without
leaving the inventory behind.
This means that naive mods like /home commands
will now work correctly and teleport only the
player, and not items.
Under pathological circumstances such as players
getting stuck near mapgen_limit, we don't want them getting stuck outside the bounds and then
pushed up past the ceiling. Instead always try to
bias the push toward the origin, under the
assumption that some place near there should
be safe.
The hack to start new players with full breath does
not apparently work with existing players, so players
are joining to find their breath half gone at the start
of play.
Instead, let's just hide the breath HUD entirely for the
initial half of underwater movement, and only show it
when the player is running low. This effectively hides
the fact that players are losing the top half of breath
when joining, in the common case.
Players joining and being immediately submerged in
water is an uncommon enough case that this will
probably not affect gameplay significantly.
This feature is too annoying in practice and makes
the player harder to control when in water under most
circumstances, and isn't worth it for the cases it does
handle.
Buffing player breath should help alleviate drowning
problems due to network issues or chat. Players may
just have to manually resurface more frequently.
This feature could be reconsidered for inclusion if a
better way to do it could be found, and if it could limit
gameplay impact. Ideally the player should simply
remain at a fixed location when not moving (i.e. the
player character should counteract any drift
automatically) but that would require engine/client
changes.
- Climbing long ladders is often necessary (deep mining for key
materials like molten rock) and boring.
- Running-up-ladder prevention hasn't really been working right
anyway; it's trivial to bypass it by "wiggling" as you climb.
- Ladder running prevention was done as a "realism" thing, which
we are always prepared to sacrifice if it interferes with fun.
Instead of simply allowing the previous "exploit" allowing players
to run up ladders as long as they're "running" into them, actually
allow fast ladder-climbing (and up-swimming) as a first-class
feature.
We tried this first back in 5.0, and found that there were issues:
- Some collision detection stuff broke.
- It felt choppy.
- Didn't work consistently on Android.
- There was already auto-jump anyway.
Since then, with the addition of auto-run, auto-jump has not felt
sufficient, especially for climbing terrain or staircases. There
have also been a number of updates since the last time stepheight
was tried, including to collision detection and movement.
It's time to see how this feels in actual gameplay again.
Set stepheight to just a little above 1, so player can step up
a full node, plus a little margin of error for rounding etc.
This prevents the "running up a ladder"
exploit, and adds a bit of realism.
This MAY cause problems for players who
have sufficiently crappy network, so
hopefully the liberal stuck time of 2 full
seconds is enough. Players with that much
latency probably can't pummel, so probably
can't play anyway.