mirror of
https://github.com/LoneWolfHT/headanim.git
synced 2025-01-06 20:37:30 +01:00
Restore compatibility w/ 5.8.0 and older clients (#4)
This commit is contained in:
parent
d7839acfdc
commit
580816fb3a
7
init.lua
7
init.lua
@ -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
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user