From b13487c26c7d9d0441053ddcd9938d8b51455af2 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 22 May 2021 19:45:55 +0200 Subject: [PATCH] update --- mods/ambience/init.lua | 51 +++++++------ mods/ambience/soundsets.lua | 2 +- .../home_workshop_misc/init.lua | 4 + .../homedecor_kitchen/init.lua | 28 +++---- mods/mobs_animal/lucky_block.lua | 2 +- mods/mobs_redo/mount.lua | 2 + mods/skinsdb/meta/character_2031.txt | 3 + mods/skinsdb/meta/character_2032.txt | 3 + mods/skinsdb/meta/character_2033.txt | 3 + mods/skinsdb/textures/character_2031.png | Bin 0 -> 3455 bytes mods/skinsdb/textures/character_2032.png | Bin 0 -> 2144 bytes mods/skinsdb/textures/character_2033.png | Bin 0 -> 2955 bytes mods/ts_furniture/init.lua | 69 +++++++++++------- mods/tubelib2/internal1.lua | 2 +- 14 files changed, 105 insertions(+), 64 deletions(-) create mode 100644 mods/skinsdb/meta/character_2031.txt create mode 100644 mods/skinsdb/meta/character_2032.txt create mode 100644 mods/skinsdb/meta/character_2033.txt create mode 100644 mods/skinsdb/textures/character_2031.png create mode 100644 mods/skinsdb/textures/character_2032.png create mode 100644 mods/skinsdb/textures/character_2033.png diff --git a/mods/ambience/init.lua b/mods/ambience/init.lua index 88dfc735..31a0edef 100644 --- a/mods/ambience/init.lua +++ b/mods/ambience/init.lua @@ -7,6 +7,7 @@ minetest.override_item("default:water_flowing", { sounds = {} }) minetest.override_item("default:river_water_source", { sounds = {} }) minetest.override_item("default:river_water_flowing", { sounds = {} }) + -- settings local SOUNDVOLUME = 1.0 local MUSICVOLUME = 1.0 @@ -19,8 +20,6 @@ local sound_set_order = {} -- needed because pairs loops randomly through tables local set_nodes = {} -- all the nodes needed for sets --- global functions - -- add set to list ambience.add_set = function(set_name, def) @@ -73,10 +72,7 @@ end -- return set from list using name ambience.get_set = function(set_name) - - if sound_sets[set_name] then - return sound_sets[set_name] - end + return sound_sets[set_name] end @@ -100,11 +96,22 @@ ambience.del_set = function(set_name) end +-- setup table when player joins +minetest.register_on_joinplayer(function(player) + playing[player:get_player_name()] = {} +end) + +-- remove table when player leaves +minetest.register_on_leaveplayer(function(player) + playing[player:get_player_name()] = nil +end) + + -- plays music and selects sound set local get_ambience = function(player, tod, name) -- play server or local music if available - if play_music and playing[name] then + if play_music then -- play at midnight if tod >= 0.0 and tod <= 0.01 then @@ -112,7 +119,7 @@ local get_ambience = function(player, tod, name) if not playing[name].music then playing[name].music = minetest.sound_play("ambience_music", { - to_player = player:get_player_name(), + to_player = name, gain = MUSICVOLUME }) end @@ -123,7 +130,6 @@ local get_ambience = function(player, tod, name) end end - -- get foot and head level nodes at player position local pos = player:get_pos() ; if not pos then return end @@ -168,6 +174,8 @@ local get_ambience = function(player, tod, name) end end end + + return nil, nil -- ADDED end @@ -198,11 +206,10 @@ minetest.register_globalstep(function(dtime) --print(string.format("elapsed time: %.4f\n", os.clock() - t1)) - ok = true -- everything starts off ok + ok = playing[player_name] -- everything starts off ok if player around -- are we playing something already? - if playing[player_name] - and playing[player_name].handler then + if ok and playing[player_name].handler then -- stop current sound if another set active or gain changed if playing[player_name].set ~= set_name @@ -213,8 +220,8 @@ minetest.register_globalstep(function(dtime) minetest.sound_stop(playing[player_name].handler) playing[player_name].set = nil - playing[player_name].handler = nil playing[player_name].gain = nil + playing[player_name].handler = nil else ok = false -- sound set still playing, skip new sound end @@ -246,9 +253,9 @@ minetest.register_globalstep(function(dtime) --print("-- current handler", handler) -- set what player is currently listening to - playing[player_name] = { - set = set_name, gain = MORE_GAIN, handler = handler - } + playing[player_name].set = set_name + playing[player_name].gain = MORE_GAIN + playing[player_name].handler = handler -- set timer to stop sound minetest.after(ambience.length, function() @@ -264,10 +271,10 @@ minetest.register_globalstep(function(dtime) minetest.sound_stop(handler) - -- reset player variables and backup handler - playing[player_name] = { - set = nil, gain = nil, handler = nil - } + -- reset player variables + playing[player_name].set = nil + playing[player_name].gain = nil + playing[player_name].handler = nil end end) end @@ -290,7 +297,7 @@ minetest.register_chatcommand("svol", { if SOUNDVOLUME > 1.0 then SOUNDVOLUME = 1.0 end return true, "Sound volume set to " .. SOUNDVOLUME - end, + end }) @@ -313,7 +320,7 @@ minetest.register_chatcommand("mvol", { if MUSICVOLUME > 1.0 then MUSICVOLUME = 1.0 end return true, "Music volume set to " .. MUSICVOLUME - end, + end }) diff --git a/mods/ambience/soundsets.lua b/mods/ambience/soundsets.lua index 657674f9..01989669 100644 --- a/mods/ambience/soundsets.lua +++ b/mods/ambience/soundsets.lua @@ -32,7 +32,7 @@ ambience.add_set("splash", { frequency = 1000, sounds = { - {name = "swim_splashing", length = 3}, + {name = "swim_splashing", length = 3} }, sound_check = function(def) diff --git a/mods/home_workshop_modpack/home_workshop_misc/init.lua b/mods/home_workshop_modpack/home_workshop_misc/init.lua index 0959ab30..ed99009f 100644 --- a/mods/home_workshop_modpack/home_workshop_misc/init.lua +++ b/mods/home_workshop_modpack/home_workshop_misc/init.lua @@ -14,6 +14,7 @@ minetest.register_node("home_workshop_misc:tool_cabinet", { "home_workshop_common_generic_metal_bright.png", "home_workshop_misc_tool_cabinet_misc.png", }, + paramtype = "light", paramtype2="facedir", inventory_image = "home_workshop_misc_tool_cabinet_inv.png", on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil, @@ -33,6 +34,7 @@ minetest.register_node("home_workshop_misc:beer_tap", { { name = "home_workshop_common_generic_metal.png", color = 0xff303030 } }, inventory_image = "home_workshop_misc_beertap_inv.png", + paramtype = "light", paramtype2 = "facedir", groups = { snappy=3 }, walkable = false, @@ -70,6 +72,7 @@ minetest.register_node("home_workshop_misc:beer_mug", { mesh = "home_workshop_misc_beer_mug.obj", tiles = { "home_workshop_misc_beer_mug.png" }, inventory_image = "home_workshop_misc_beer_mug_inv.png", + paramtype = "light", paramtype2 = "facedir", groups = { snappy=3, oddly_breakable_by_hand=3 }, walkable = false, @@ -93,6 +96,7 @@ minetest.register_node("home_workshop_misc:soda_machine", { drawtype = "mesh", mesh = "home_workshop_misc_soda_machine.obj", tiles = {"home_workshop_misc_soda_machine.png"}, + paramtype = "light", paramtype2 = "facedir", groups = {snappy=3}, selection_box = svm_cbox, diff --git a/mods/homedecor_modpack/homedecor_kitchen/init.lua b/mods/homedecor_modpack/homedecor_kitchen/init.lua index 4dc1af8d..9c321351 100644 --- a/mods/homedecor_modpack/homedecor_kitchen/init.lua +++ b/mods/homedecor_modpack/homedecor_kitchen/init.lua @@ -570,7 +570,7 @@ minetest.register_craft({ }) minetest.register_craft({ - output = "homedecor:kitchen_cabinet", + output = "homedecor:kitchen_cabinet_colorable", recipe = { {"group:wood", "group:stick", "group:wood", }, {"group:wood", "group:stick", "group:wood", }, @@ -579,53 +579,53 @@ minetest.register_craft({ }) minetest.register_craft({ - output = "homedecor:kitchen_cabinet_steel", + output = "homedecor:kitchen_cabinet_colorable_steel", recipe = { {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, - {"", "homedecor:kitchen_cabinet", ""}, + {"", "homedecor:kitchen_cabinet_colorable", ""}, } }) minetest.register_craft({ - output = "homedecor:kitchen_cabinet_steel", + output = "homedecor:kitchen_cabinet_colorable_steel", recipe = { {"moreblocks:slab_steelblock_1"}, - { "homedecor:kitchen_cabinet" }, + { "homedecor:kitchen_cabinet_colorable" }, } }) minetest.register_craft({ - output = "homedecor:kitchen_cabinet_marble", + output = "homedecor:kitchen_cabinet_colorable_marble", recipe = { {"building_blocks:slab_marble"}, - {"homedecor:kitchen_cabinet"}, + {"homedecor:kitchen_cabinet_colorable"}, } }) minetest.register_craft({ - output = "homedecor:kitchen_cabinet_marble", + output = "homedecor:kitchen_cabinet_colorable_marble", recipe = { {"technic:slab_marble_1"}, - {"homedecor:kitchen_cabinet"}, + {"homedecor:kitchen_cabinet_colorable"}, } }) minetest.register_craft({ - output = "homedecor:kitchen_cabinet_granite", + output = "homedecor:kitchen_cabinet_colorable_granite", recipe = { {"technic:slab_granite_1"}, - {"homedecor:kitchen_cabinet"}, + {"homedecor:kitchen_cabinet_colorable"}, } }) minetest.register_craft({ type = "shapeless", - output = "homedecor:kitchen_cabinet_half 2", - recipe = { "homedecor:kitchen_cabinet" } + output = "homedecor:kitchen_cabinet_colorable_half 2", + recipe = { "homedecor:kitchen_cabinet_colorable" } }) minetest.register_craft({ - output = "homedecor:kitchen_cabinet_with_sink", + output = "homedecor:kitchen_cabinet_colorable_with_sink", recipe = { {"group:wood", "default:steel_ingot", "group:wood", }, {"group:wood", "default:steel_ingot", "group:wood", }, diff --git a/mods/mobs_animal/lucky_block.lua b/mods/mobs_animal/lucky_block.lua index e88b20d4..e2b028c2 100644 --- a/mods/mobs_animal/lucky_block.lua +++ b/mods/mobs_animal/lucky_block.lua @@ -12,7 +12,7 @@ if minetest.get_modpath("lucky_block") then {"spw", "mobs:chicken", 5}, {"dro", {"mobs:egg"}, 5}, {"spw", "mobs:cow", 5}, - {"dro", {"mobs:bucket_milk"}, 8}, + {"dro", {"mobs:bucket_milk", "bucket:bucket_water"}, 8}, {"spw", "mobs:kitten", 2}, {"exp"}, {"dro", {"mobs:hairball"}, 3}, diff --git a/mods/mobs_redo/mount.lua b/mods/mobs_redo/mount.lua index 550bf3e9..7a72c64c 100644 --- a/mods/mobs_redo/mount.lua +++ b/mods/mobs_redo/mount.lua @@ -387,6 +387,8 @@ function mobs.fly(entity, _, speed, shoots, arrow, moving_anim, stand_anim) local dir = entity.driver:get_look_dir() local yaw = entity.driver:get_look_horizontal() + 1.57 -- offset fix between old and new commands +if not ctrl or not velo then return end + if ctrl.up then entity.object:set_velocity({ x = dir.x * speed, diff --git a/mods/skinsdb/meta/character_2031.txt b/mods/skinsdb/meta/character_2031.txt new file mode 100644 index 00000000..e8272083 --- /dev/null +++ b/mods/skinsdb/meta/character_2031.txt @@ -0,0 +1,3 @@ +Iron Man MK. 7 +Jordach +CC BY-SA 3.0 diff --git a/mods/skinsdb/meta/character_2032.txt b/mods/skinsdb/meta/character_2032.txt new file mode 100644 index 00000000..2cdf6122 --- /dev/null +++ b/mods/skinsdb/meta/character_2032.txt @@ -0,0 +1,3 @@ +character_mumbo_0 +Sam_0 +CC BY 4.0 diff --git a/mods/skinsdb/meta/character_2033.txt b/mods/skinsdb/meta/character_2033.txt new file mode 100644 index 00000000..6e73b4eb --- /dev/null +++ b/mods/skinsdb/meta/character_2033.txt @@ -0,0 +1,3 @@ +character_sam_v4 +Sam_0 +CC BY 4.0 diff --git a/mods/skinsdb/textures/character_2031.png b/mods/skinsdb/textures/character_2031.png new file mode 100644 index 0000000000000000000000000000000000000000..6914f12d3f44d420950b9d80a0bf6a06f2f93be9 GIT binary patch literal 3455 zcmV-_4S@2AP)msV50N6Jt*S&-qzaMUn)hB@+n9(ZY2^Gm4^!iN{tJ$ zRXa8~j2YY4Gk4}b&OML4&+dnNJ)W__V}#RWeL8oYv-e%=zt`I9ztLKp<(^Ts+t@P|i^h{gWncPVPI58AV{bfSoo zlq^>YM+kJDlV%ycECXZ6j3EdDlu~%E3qp{lDO&6Q4XsvCQ{r#W4WG zr4o@+v^pK)ETdknqNF5F65=!kz*7os%x~BFDjJ`ltKjo>0l3-X|*W$K53SrwI(c;a0V&y`!0(DAb~8)Xk{6bX^QVS z7%54*UE(+fDZv<`D8d51?-TWUv^pKirP38K@`LAASy^=1_?=?{;K+|RSbz48@ zGSQ_DY};mAv$Mp#9#NW7^t?I4J=djFE`zmLYmvqv0beN!VMwV`VXD!<9c+-+T6$@U z0~CryD%C3cH*K=kT3(r)q&L`0ijKpMu`z@Y+;-^Dq9_GR%jonx0IJ}kyy6uBK>Wx0 z^|l+w#94-~6h+@B(;AcKxQ;_Rjv202DOW0Z-7WxWsYJWgVrq7la-l$$=SauFRf=Ac zkZ4W8bvY8pbh8WtY!(7F07@If0c(-K?wOg(3X>BrZn0ueh^&FtcmMYl2``lzL!Rdh zm&D{lBRfS{xgH`vu$7Itmv}XqZ`Q}$xRhOLo^(Y@c-{njcVXQ?8LD}=Txlo`3 zbfknqWE|;q&;wqegy73zxS)Ij{AA@yyS7|r`@FPx_o-!b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?-Td|Bgg)N z%9%D3&I72DLKV(4#GmbMvEr$xD6e17zkc(Ztn+=GYL#3Fw3OIhkL`}b2T8)s?;ix< z?IdA)vB*@Oqe~@nV{oj+%+6wg_hx3OxGpLv0R7ZBFf+sTCpJKL?JIk{9o9u&&-eY0f7`=PJbfN}*o(+lW6Jtx$cwuUHf9qS=bcbk0#fLV&+$zfu!GRKX)KI{$Yd6SWMop3d@(CPu-Od zSl)OvtU^-UU3*&a(>X7HEYQ8oYpzw zlIL?hg*D%|{CroF^+SS<1MYvg+vVu4CU@*oWIuHfc@F2sTFchqVMxdh($O}%Jp9;W@VYomcrDW;I z2vNIDYp{an!fV6W7=<*Y`s}k5N+o87hxx^+Q>+1&g&|}aZ$HsvN1?#j$OwneoB?3n z$OysgEH6CKEzO3=noE1w78 z=37q<&3$+MV0CT^!%w|HF@twD2r$Kq8=$U~2q6eOuiwU-r%!vm z%W!=FfN&hlJOJjN2ccIg7SURx=jFJdPnpkc!@5+OYmEHzu`c)QE)jbky3s&48pNK* zJ-bW%^0DsRcY2T>2cw9WCMVf9F~LZZFp?zfo0#CG$w>}I5w7dvNJ)}qbldIomP<*! zTt<2x)|ffFi^U@CC|cmtr9`~Ee!bPkPz^&|&!aQgb+a_3nU zab1_0P6uNQBSS;@gDz5gW`=+H=p!V|MF`enfIs=tmnaYFa}q_InVu#XT%^QV#__?$ z>RQjE;JO3@@P*^xxh~dPCfaRQRVo~sp61$-5p13_Jv&Pn1bD8?+ow*kAq;tQdYWz3 hDt~<9#3iZl{{iyyG>B4G?sotH002ovPDHLkV1iF0ug3rY literal 0 HcmV?d00001 diff --git a/mods/skinsdb/textures/character_2032.png b/mods/skinsdb/textures/character_2032.png new file mode 100644 index 0000000000000000000000000000000000000000..a0f8ba6785c27537f19d0670311097ee8aafd7e1 GIT binary patch literal 2144 zcmV-m2%qPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D2lYurK~z{r&6sO! z99I>`cV}m3XLn~`w%2x?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;k+9Ao$r9#+8z`pC3Zb)I>TJQoVz#8vusmBUBUCR?KS0&C37~HoXt)EbwMP2%9lr zudyscpxcNk;v&SFOT%h*PHE9}&E^7xQeXXS8x zRy;NzGTXJ8?)6dGsVy-V28hUX|N6*)o!XYZ0y+11S;QcKShw*7O2m*;!k+h~_8gHL z*RQFFusdtG^M>c;*E&Rm`LbtL*)an^Qn=?wTmJ1okBcXVNJ@!!{o%K$T`^!8lrCl# zePplQq~F0ZFsmJnGoz;yebkL$TD#IM8i8fkQ&knu-u!1&6)_g$Ja&u&s+lwlXilhR ze7jv(Ido`>xMm9x;l20Xe_<++E4w?2vBVIl>Uvs`YFV6!5JD(rY6#PF5h3TyPhIJ; zqT`oYVKHQu0lbB;{oZ>3c;HXJM@Z0mn2kr^DJw}!RTy(IdbLueRHn|r*T4D{h?IIC zu+EcX+~@++&|#cMj73u-=dv|Kgu8z6cP|9s{{SXbS_Ev>T%`a2002ovPDHLkV1kau B#O441 literal 0 HcmV?d00001 diff --git a/mods/ts_furniture/init.lua b/mods/ts_furniture/init.lua index 30702fe0..748707bc 100755 --- a/mods/ts_furniture/init.lua +++ b/mods/ts_furniture/init.lua @@ -8,6 +8,21 @@ ts_furniture.kneeling_bench = minetest.settings:get_bool("ts_furniture.kneeling_ -- Used for localization local S = minetest.get_translator("ts_furniture") +-- Get texture by node name +local T = function (node_name) + local def = minetest.registered_nodes[node_name] + if not (def and def.tiles) then + return "" + end + local tile = def.tiles[5] or def.tiles[4] or def.tiles[3] or def.tiles[2] or def.tiles[1] + if type(tile) == "string" then + return tile + elseif type(tile) == "table" and tile.name then + return tile.name + end + return "" +end + -- The following code is from "Get Comfortable [cozy]" (by everamzah; published under WTFPL) -- Thomas S. modified it, so that it can be used in this mod if ts_furniture.enable_sitting then @@ -174,6 +189,10 @@ local ignore_groups = { } function ts_furniture.register_furniture(recipe, description, tiles) + if not tiles then + tiles = T(recipe) + end + local recipe_def = minetest.registered_items[recipe] if not recipe_def then return @@ -217,34 +236,34 @@ function ts_furniture.register_furniture(recipe, description, tiles) end end -ts_furniture.register_furniture("default:aspen_wood", "Aspen", "default_aspen_wood.png") -ts_furniture.register_furniture("default:pine_wood", "Pine", "default_pine_wood.png") -ts_furniture.register_furniture("default:acacia_wood", "Acacia", "default_acacia_wood.png") -ts_furniture.register_furniture("default:wood", "Wooden", "default_wood.png") -ts_furniture.register_furniture("default:junglewood", "Jungle Wood", "default_junglewood.png") +ts_furniture.register_furniture("default:aspen_wood", "Aspen") +ts_furniture.register_furniture("default:pine_wood", "Pine") +ts_furniture.register_furniture("default:acacia_wood", "Acacia") +ts_furniture.register_furniture("default:wood", "Wooden") +ts_furniture.register_furniture("default:junglewood", "Jungle Wood") if (minetest.get_modpath("moretrees")) then - ts_furniture.register_furniture("moretrees:apple_tree_planks", "Apple Tree", "moretrees_apple_tree_wood.png") - ts_furniture.register_furniture("moretrees:beech_planks", "Beech", "moretrees_beech_wood.png") - ts_furniture.register_furniture("moretrees:birch_planks", "Birch", "moretrees_birch_wood.png") - ts_furniture.register_furniture("moretrees:fir_planks", "Fir", "moretrees_fir_wood.png") - ts_furniture.register_furniture("moretrees:oak_planks", "Oak", "moretrees_oak_wood.png") - ts_furniture.register_furniture("moretrees:palm_planks", "Palm", "moretrees_palm_wood.png") - ts_furniture.register_furniture("moretrees:rubber_tree_planks", "Rubber Tree", "moretrees_rubber_tree_wood.png") - ts_furniture.register_furniture("moretrees:sequoia_planks", "Sequoia", "moretrees_sequoia_wood.png") - ts_furniture.register_furniture("moretrees:spruce_planks", "Spruce", "moretrees_spruce_wood.png") - ts_furniture.register_furniture("moretrees:willow_planks", "Willow", "moretrees_willow_wood.png") + ts_furniture.register_furniture("moretrees:apple_tree_planks", "Apple Tree") + ts_furniture.register_furniture("moretrees:beech_planks", "Beech") + ts_furniture.register_furniture("moretrees:birch_planks", "Birch") + ts_furniture.register_furniture("moretrees:fir_planks", "Fir") + ts_furniture.register_furniture("moretrees:oak_planks", "Oak") + ts_furniture.register_furniture("moretrees:palm_planks", "Palm") + ts_furniture.register_furniture("moretrees:rubber_tree_planks", "Rubber Tree") + ts_furniture.register_furniture("moretrees:sequoia_planks", "Sequoia") + ts_furniture.register_furniture("moretrees:spruce_planks", "Spruce") + ts_furniture.register_furniture("moretrees:willow_planks", "Willow") end if minetest.get_modpath("ethereal") then - ts_furniture.register_furniture("ethereal:banana_wood", "Banana", "banana_wood.png") - ts_furniture.register_furniture("ethereal:birch_wood", "Birch", "moretrees_birch_wood.png") - ts_furniture.register_furniture("ethereal:frost_wood", "Frost", "frost_wood.png") - ts_furniture.register_furniture("ethereal:mushroom_trunk", "Mushroom", "mushroom_trunk.png") - ts_furniture.register_furniture("ethereal:palm_wood", "Palm", "moretrees_palm_wood.png") - ts_furniture.register_furniture("ethereal:redwood_wood", "Redwood", "redwood_wood.png") - ts_furniture.register_furniture("ethereal:sakura_wood", "Sakura", "ethereal_sakura_wood.png") - ts_furniture.register_furniture("ethereal:scorched_tree", "Scorched", "scorched_tree.png") - ts_furniture.register_furniture("ethereal:willow_wood", "Willow", "willow_wood.png") - ts_furniture.register_furniture("ethereal:yellow_wood", "Healing Tree", "yellow_wood.png") + ts_furniture.register_furniture("ethereal:banana_wood", "Banana") + ts_furniture.register_furniture("ethereal:birch_wood", "Birch") + ts_furniture.register_furniture("ethereal:frost_wood", "Frost") + ts_furniture.register_furniture("ethereal:mushroom_trunk", "Mushroom") + ts_furniture.register_furniture("ethereal:palm_wood", "Palm") + ts_furniture.register_furniture("ethereal:redwood_wood", "Redwood") + ts_furniture.register_furniture("ethereal:sakura_wood", "Sakura") + ts_furniture.register_furniture("ethereal:scorched_tree", "Scorched") + ts_furniture.register_furniture("ethereal:willow_wood", "Willow") + ts_furniture.register_furniture("ethereal:yellow_wood", "Healing Tree") end diff --git a/mods/tubelib2/internal1.lua b/mods/tubelib2/internal1.lua index 5d7f5faf..d4eeda0f 100644 --- a/mods/tubelib2/internal1.lua +++ b/mods/tubelib2/internal1.lua @@ -33,7 +33,7 @@ local function get_pos(pos, dir) end local function fdir(self, player) - local pitch = player:get_look_pitch() + local pitch = player:get_look_vertical() if pitch > 1.0 and self.valid_dirs[6] then -- up? return 6 elseif pitch < -1.0 and self.valid_dirs[5] then -- down?