- Move the player head up to show neck again.
- Limit down-looking to not collide with bandolier.
- Slide head forward/back while rotating to keep it
centered atop the neck and appear connected.
- Pitch player head up/down based on look dir
- Set frame_blend to 0.15, causing 150ms of tweening
from one animation to another, so player bone
movement is smooth.
- Enabling frame_blend breaks some parts of the
anims, but oddly, enabling head pitch control actually
fixes these...
- Head pitch does not follow lookdir 100%, there is
some implied use of vertical eye movement balanced
in, so the player does not look like they're breaking
their neck at extreme angles.
- Support anims specifying a head pitch offset, e.g.
for the swimming anims which require the head to
pitch backward to face forward.
MT seems to have a problem with bones that are not animated
and have exactly 0 rotation, i.e. interpreting this as 180 degrees
(supposedly this is a workaround for some other quirk). Give
the chest and bandolier bones tiny non-zero rotation adjustments
to trick MT into putting them as close as possible to zero without
triggering this bug.
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.
Some users may use filtering but not have the "clean transparent"
filter enabled in the Minetest engine config. Bake this filter
into all images to (1) avoid the consequences of this (i.e. black
halos), and (2) possibly speed up startup time (the filter will
converge immediately).
Handle single player as a special case and use the
default, un-colorized skin. This should also make
it easier for people to change the SP skin without
having to interact with the colorization system.
- This was never known to be used.
- Player meta is only available for online players, so
this would prevent looking up skins for offline
players.
- This API arguably needs more overhauling to work
with offline player properly though (e.g. pass
player name instead of player object).
Colorize player clothes based on a hash of player
name. This should make it easier to distinguish
players from each other even when you can't see
their names, by remembering clothing colors.
Unfortunately there's no good way currently to
prevent some ugly color combinations, which may
risk incentivizing players to mess with their name
until they get a combination they like, creating a
bunch of junk accounts. Making colors never
clash (i.e. always matching or complementary
hues) would reduce the variation in colorations,
causing more player color collisions.
Finding a way to ensure colors are "pretty" but
still having enough variation to give each player
name a unique color scheme would be ideal. Also
there's room for more variations, e.g. adding some
stripes, patterns, emblems, etc. that can be
colorized separately, ideally something visible
from every angle.
Just realized that this breaks certain custom skins,
like WintersKnight's prosthetic arm. The
performance improvement from culling a handful of
polygons is really nothing compared to the loss of
unique use of transparency in texture art.
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.