mirror of
https://github.com/LoneWolfHT/headanim.git
synced 2025-01-08 21:37:29 +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 get_connected_players = minetest.get_connected_players
|
||||||
local lastdir = {}
|
local lastdir = {}
|
||||||
|
local basepos = vector.new(0, 6.35, 0)
|
||||||
|
|
||||||
minetest.register_globalstep(function()
|
minetest.register_globalstep(function()
|
||||||
for _, player in pairs(get_connected_players()) do
|
for _, player in pairs(get_connected_players()) do
|
||||||
@ -9,9 +10,13 @@ minetest.register_globalstep(function()
|
|||||||
if (lastdir[pname] or 0) ~= ldeg then
|
if (lastdir[pname] or 0) ~= ldeg then
|
||||||
lastdir[pname] = ldeg
|
lastdir[pname] = ldeg
|
||||||
player:set_bone_override("Head", {
|
player:set_bone_override("Head", {
|
||||||
|
position = {
|
||||||
|
vec = basepos,
|
||||||
|
absolute = true
|
||||||
|
},
|
||||||
rotation = {
|
rotation = {
|
||||||
vec = {x = ldeg, y = 0, z = 0},
|
vec = {x = ldeg, y = 0, z = 0},
|
||||||
interpolation = 0.14,
|
interpolation = 0.09,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user