mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-04 23:31:05 +01:00
added comment and removed unnecessary code
This commit is contained in:
parent
4738834ddd
commit
a41cbb7ebf
1 changed files with 2 additions and 4 deletions
|
@ -499,12 +499,10 @@ minetest.register_globalstep(function(dtime)
|
||||||
|
|
||||||
-- Is player suffocating inside node? (Only for solid full opaque cube type nodes
|
-- Is player suffocating inside node? (Only for solid full opaque cube type nodes
|
||||||
-- without group disable_suffocation=1)
|
-- without group disable_suffocation=1)
|
||||||
|
-- if swimming, check the feet node instead, because the head node will be above the player when swimming
|
||||||
local ndef = nil
|
local ndef = minetest.registered_nodes[node_head]
|
||||||
if is_swimming then
|
if is_swimming then
|
||||||
ndef = minetest.registered_nodes[node_feet]
|
ndef = minetest.registered_nodes[node_feet]
|
||||||
else
|
|
||||||
ndef = minetest.registered_nodes[node_head]
|
|
||||||
end
|
end
|
||||||
if (ndef.walkable == nil or ndef.walkable == true)
|
if (ndef.walkable == nil or ndef.walkable == true)
|
||||||
and (ndef.collision_box == nil or ndef.collision_box.type == "regular")
|
and (ndef.collision_box == nil or ndef.collision_box.type == "regular")
|
||||||
|
|
Loading…
Reference in a new issue