Fix visual artifacts on the sides of rails

This commit is contained in:
teknomunk 2024-04-25 07:16:31 +00:00
parent 515bdfd9b3
commit bd91556545
2 changed files with 21 additions and 7 deletions

View File

@ -0,0 +1,15 @@
# hand-made Wavefront .OBJ file for sloped rail
mtllib mcl_minecarts_rail.mtl
o flat_track.001
v -0.500000 -0.437500 -0.500000
v -0.500000 -0.437500 0.500000
v 0.500000 -0.437500 0.500000
v 0.500000 -0.437500 -0.500000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vn 0.000000 1.000000 0.000000
usemtl None
s off
f 1/1/1 2/2/1 3/3/1 4/4/1

View File

@ -149,19 +149,18 @@ local railuse = S(
mod.text = mod.text or {} mod.text = mod.text or {}
mod.text.railuse = railuse mod.text.railuse = railuse
local BASE_DEF = { local BASE_DEF = {
drawtype = "nodebox", drawtype = "mesh",
node_box = { mesh = "flat_track.obj",
type = "fixed",
fixed = {
{-8/16, -8/16, -8/16, 8/16, -7/16, 8/15}
}
},
paramtype = "light", paramtype = "light",
paramtype2 = "4dir", paramtype2 = "4dir",
stack_max = 64, stack_max = 64,
sounds = mcl_sounds.node_sound_metal_defaults(), sounds = mcl_sounds.node_sound_metal_defaults(),
is_ground_content = true, is_ground_content = true,
paramtype = "light", paramtype = "light",
collision_box = {
type = "fixed",
fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/15 }
},
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},