mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 04:21:07 +01:00
Change the underwater detection code a bit
This commit is contained in:
parent
24b1078b61
commit
0c0845c1bd
1 changed files with 6 additions and 1 deletions
|
@ -395,8 +395,13 @@ minetest.register_globalstep(function(dtime)
|
||||||
set_bone_pos(player,"Body_Control", nil, vector.new(0, -player_vel_yaw + yaw, 0))
|
set_bone_pos(player,"Body_Control", nil, vector.new(0, -player_vel_yaw + yaw, 0))
|
||||||
end
|
end
|
||||||
|
|
||||||
if get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 or get_item_group(mcl_playerinfo[name].node_head, "water") ~= 1 then
|
local underwater
|
||||||
|
if get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 and underwater ~= true then
|
||||||
mcl_weather.skycolor.update_sky_color()
|
mcl_weather.skycolor.update_sky_color()
|
||||||
|
local underwater = true
|
||||||
|
elseif get_item_group(mcl_playerinfo[name].node_head, "water") == 0 and underwater == true then
|
||||||
|
mcl_weather.skycolor.update_sky_color()
|
||||||
|
local underwater = false
|
||||||
end
|
end
|
||||||
|
|
||||||
elytra.last_yaw = player:get_look_horizontal()
|
elytra.last_yaw = player:get_look_horizontal()
|
||||||
|
|
Loading…
Reference in a new issue