add eye offset

This commit is contained in:
Elkien3 2018-07-25 09:09:39 -05:00 committed by GitHub
parent 1c285f77d9
commit dd29f17212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,6 +114,7 @@ knockout.knockout = function(pName, duration)
-- Make player lay down -- Make player lay down
default.player_attached[pName] = true default.player_attached[pName] = true
default.player_set_animation(p, "lay") default.player_set_animation(p, "lay")
p:set_eye_offset({x=0, y=-13, z=-2}, {x=0, y=0, z=0})
-- No interacting for you, player -- No interacting for you, player
local privs = minetest.get_player_privs(pName) local privs = minetest.get_player_privs(pName)
privs.shout = nil privs.shout = nil
@ -138,6 +139,7 @@ knockout.wake_up = function(pName)
-- Make player stand back up -- Make player stand back up
default.player_attached[pName] = false default.player_attached[pName] = false
default.player_set_animation(p, "stand") default.player_set_animation(p, "stand")
set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
-- If the player was being carried, remove that -- If the player was being carried, remove that
for name, carried in pairs(knockout.carrying) do for name, carried in pairs(knockout.carrying) do
if carried == pName then if carried == pName then