I used to do this by just starting a LAN game
and logging in multiple accounts, but not only
is this inconvenient, but the poses don't match
on each screenshot either.
Allow the built-in teleport command to be used
with standard NodeCore rules, i.e. players
can move freely, but items cannot. Players
travelling by use of this command need a
special priv to keep inventory.
This effectively "debounces" the controls for
waving and mining anims, so players who
are just doing quick punches like for pummel
will still animate visibly for other players
instead of just a "flickering" of the action.
Hughes Ross has started to work on a PR for this
(https://github.com/minetest/minetest/pull/10140)
but it doesn't look like it will be ready until 5.4 at
least, and we will support pre-5.4 versions for
some time yet. The ability for TP artists to
override special_tiles is necessary to allow things
like flowing liquid textures to be customized in
texture packs.
Add a hack for these, similar to how we did the
inventory/wield image hacks.
Note that we are also forcing overrides for special
tiles, since there may be cases where we reuse a
base image without modifiers but TP artists may
still want an independent override.
Apparently this interacts badly with
optomechanics when multiple optic
tick cycles are running on a single
globalstep, since it may cause doors to
miss signals if they quiesce back to
off during the step.
Instead of limiting the number of cycles
to some arbitrary upper bound, run as
many cycles as necessary up to a CPU
time limit, i.e. we only allow expansion
of globalstep time by a fixed limit.
If we're running multiple optic ticks in
rapid succession, then we don't return
control to the rest of the game between
ticks, so there's no point in reading the
map more than once per pos, and no
point in updating the map until the end
when optics may have oscillated
across multiple states.
Maintain a cache and commit buffer
during each globalstep and only flush
them at the end.
Apparently as oilboi pointed out, node metadata
is kinda gross, and in this case we didn't actually
need it, since the information could actually
always have been inferred from the nodes
themselves.
Instead of storing output state in node meta,
just register a callback on the node definition to
interrogate the node itself about its power output.
Item ejection due to injury or teleportation:
- Check for custom on_drop calls from items, e.g. admin tools
that distintegrate instead of becoming items.
- Log players losing items so we can audit where things came from
or went to.
- Make teleportation and injury APIs use the same methods.
Trying to isolate server performance issues, it was pointed out
that clients are spending a LOT of time receiving and rebuilding
mapblock meshes, and that updating node meta triggers this, even
when that meta is not relevant to the rendering of nodes.
Rubenwardy added a suggestion to change this in the engine:
https://github.com/minetest/minetest/issues/10127
This patch implements this suggestion at the game level, since
in NodeCore's case we already were making the assumption that
nearly all metadata fields were private.
Useful for more complex transformations like assembling
animations or tiling.
Use in a couple places to try it out, esp. the new living
sponge animation.
Two optimizations that added up to a significant
time savings in on_generated:
- Replacing calls to area:index(x,y,z) to precalculating
an offset and then using stride math inside the loops
gives us a huge cost savings.
- Prefilling lookup-by-ID tables to force them into
sequential arrays instead of hashmaps speeds up
lookups, for a more moderate savings.