Skip to content

Commit

Permalink
Restore compatibility w/ 5.8.0 and older clients (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklp09 authored Dec 14, 2024
1 parent d7839ac commit 580816f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local get_connected_players = minetest.get_connected_players
local lastdir = {}
local basepos = vector.new(0, 6.35, 0)

minetest.register_globalstep(function()
for _, player in pairs(get_connected_players()) do
Expand All @@ -9,9 +10,13 @@ minetest.register_globalstep(function()
if (lastdir[pname] or 0) ~= ldeg then
lastdir[pname] = ldeg
player:set_bone_override("Head", {
position = {
vec = basepos,
absolute = true
},
rotation = {
vec = {x = ldeg, y = 0, z = 0},
interpolation = 0.14,
interpolation = 0.09,
}
})
end
Expand Down

0 comments on commit 580816f

Please sign in to comment.