mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-23 02:51:06 +01:00
stay on players shoulder in when flying in creative
This commit is contained in:
parent
6101de8d68
commit
374e30b4a5
1 changed files with 2 additions and 1 deletions
|
@ -92,7 +92,8 @@ local function check_perch(self,dtime)
|
||||||
local n1 = minetest.get_node(vector.offset(p:get_pos(),0,-0.6,0)).name
|
local n1 = minetest.get_node(vector.offset(p:get_pos(),0,-0.6,0)).name
|
||||||
local n2 = minetest.get_node(vector.offset(p:get_pos(),0,0,0)).name
|
local n2 = minetest.get_node(vector.offset(p:get_pos(),0,0,0)).name
|
||||||
local n3 = minetest.get_node(vector.offset(p:get_pos(),0,1,0)).name
|
local n3 = minetest.get_node(vector.offset(p:get_pos(),0,1,0)).name
|
||||||
if n1 == "air" or minetest.get_item_group(n2,"water") > 0 or minetest.get_item_group(n2,"lava") > 0 then
|
if ( n1 == "air" or minetest.get_item_group(n2,"water") > 0 or minetest.get_item_group(n2,"lava") > 0) and
|
||||||
|
not minetest.is_creative_enabled(p:get_player_name()) then
|
||||||
o:set_detach()
|
o:set_detach()
|
||||||
self.detach_timer = 0
|
self.detach_timer = 0
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue