mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 23:10:17 +01:00
Fix door model UV for open and close (#2372)
Introduce _c and _d door types to correctly render the texture faces for the open and closed state.
This commit is contained in:
parent
81c5b6b399
commit
189d2d9fb1
@ -115,10 +115,10 @@ local transform = {
|
|||||||
{v = "_a", param2 = 2},
|
{v = "_a", param2 = 2},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{v = "_b", param2 = 1},
|
{v = "_c", param2 = 1},
|
||||||
{v = "_b", param2 = 2},
|
{v = "_c", param2 = 2},
|
||||||
{v = "_b", param2 = 3},
|
{v = "_c", param2 = 3},
|
||||||
{v = "_b", param2 = 0},
|
{v = "_c", param2 = 0},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{v = "_b", param2 = 1},
|
{v = "_b", param2 = 1},
|
||||||
@ -127,10 +127,10 @@ local transform = {
|
|||||||
{v = "_b", param2 = 0},
|
{v = "_b", param2 = 0},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{v = "_a", param2 = 3},
|
{v = "_d", param2 = 3},
|
||||||
{v = "_a", param2 = 0},
|
{v = "_d", param2 = 0},
|
||||||
{v = "_a", param2 = 1},
|
{v = "_d", param2 = 1},
|
||||||
{v = "_a", param2 = 2},
|
{v = "_d", param2 = 2},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -449,8 +449,16 @@ function doors.register(name, def)
|
|||||||
def.mesh = "door_b.obj"
|
def.mesh = "door_b.obj"
|
||||||
minetest.register_node(":" .. name .. "_b", def)
|
minetest.register_node(":" .. name .. "_b", def)
|
||||||
|
|
||||||
|
def.mesh = "door_a2.obj"
|
||||||
|
minetest.register_node(":" .. name .. "_c", def)
|
||||||
|
|
||||||
|
def.mesh = "door_b2.obj"
|
||||||
|
minetest.register_node(":" .. name .. "_d", def)
|
||||||
|
|
||||||
doors.registered_doors[name .. "_a"] = true
|
doors.registered_doors[name .. "_a"] = true
|
||||||
doors.registered_doors[name .. "_b"] = true
|
doors.registered_doors[name .. "_b"] = true
|
||||||
|
doors.registered_doors[name .. "_c"] = true
|
||||||
|
doors.registered_doors[name .. "_d"] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
doors.register("door_wood", {
|
doors.register("door_wood", {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Blender v2.76 (sub 0) OBJ File: 'door_a.blend'
|
# Blender v2.76 (sub 0) OBJ File: 'door_a.blend'
|
||||||
# www.blender.org
|
# www.blender.org
|
||||||
mtllib door_a.mtl
|
mtllib door_a.mtl
|
||||||
o Cube_Cube.001
|
o door_a
|
||||||
v 0.499000 -0.499000 -0.499000
|
v 0.499000 -0.499000 -0.499000
|
||||||
v 0.499000 1.499000 -0.499000
|
v 0.499000 1.499000 -0.499000
|
||||||
v 0.499000 -0.499000 -0.375000
|
v 0.499000 -0.499000 -0.375000
|
||||||
|
50
mods/doors/models/door_a2.obj
Normal file
50
mods/doors/models/door_a2.obj
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# Blender v2.79 (sub 0) OBJ File: ''
|
||||||
|
# www.blender.org
|
||||||
|
mtllib door_a2.mtl
|
||||||
|
o door_a2
|
||||||
|
v -0.499000 1.499000 -0.499000
|
||||||
|
v -0.499000 -0.499000 -0.499000
|
||||||
|
v -0.499000 -0.499000 -0.375000
|
||||||
|
v -0.499000 1.499000 -0.375000
|
||||||
|
v 0.499000 -0.499000 -0.375000
|
||||||
|
v 0.499000 1.499000 -0.375000
|
||||||
|
v 0.499000 -0.499000 -0.499000
|
||||||
|
v 0.499000 1.499000 -0.499000
|
||||||
|
vt 0.894737 1.000000
|
||||||
|
vt 0.894737 0.000000
|
||||||
|
vt 0.842105 0.000000
|
||||||
|
vt 0.842105 1.000000
|
||||||
|
vt 0.421052 1.000000
|
||||||
|
vt 0.421052 0.000000
|
||||||
|
vt 0.000001 0.000000
|
||||||
|
vt 0.000001 1.000000
|
||||||
|
vt 0.894737 1.000000
|
||||||
|
vt 0.894737 0.000000
|
||||||
|
vt 0.947368 0.000000
|
||||||
|
vt 0.947368 1.000000
|
||||||
|
vt 0.842105 1.000000
|
||||||
|
vt 0.842105 0.000000
|
||||||
|
vt 0.421052 0.000000
|
||||||
|
vt 0.421052 1.000000
|
||||||
|
vt 0.947368 0.000000
|
||||||
|
vt 0.947368 0.500000
|
||||||
|
vt 1.000000 0.500000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 1.000000 0.500000
|
||||||
|
vt 0.947368 0.500000
|
||||||
|
vt 0.947368 1.000000
|
||||||
|
vn -1.0000 -0.0000 0.0000
|
||||||
|
vn 0.0000 -0.0000 1.0000
|
||||||
|
vn 1.0000 0.0000 0.0000
|
||||||
|
vn 0.0000 0.0000 -1.0000
|
||||||
|
vn 0.0000 -1.0000 0.0000
|
||||||
|
vn 0.0000 1.0000 0.0000
|
||||||
|
usemtl None.009
|
||||||
|
s 1
|
||||||
|
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||||
|
f 4/5/2 3/6/2 5/7/2 6/8/2
|
||||||
|
f 6/9/3 5/10/3 7/11/3 8/12/3
|
||||||
|
f 8/13/4 7/14/4 2/15/4 1/16/4
|
||||||
|
f 2/17/5 7/18/5 5/19/5 3/20/5
|
||||||
|
f 8/21/6 1/22/6 4/23/6 6/24/6
|
@ -1,40 +1,50 @@
|
|||||||
# Blender v2.76 (sub 0) OBJ File: 'door_b.blend'
|
# Blender v2.79 (sub 0) OBJ File: ''
|
||||||
# www.blender.org
|
# www.blender.org
|
||||||
mtllib door_b.mtl
|
mtllib door_b.mtl
|
||||||
o Cube_Cube.001
|
o door_b
|
||||||
v -0.499000 -0.499000 -0.499000
|
|
||||||
v -0.499000 1.499000 -0.499000
|
|
||||||
v -0.499000 -0.499000 -0.375000
|
|
||||||
v -0.499000 1.499000 -0.375000
|
|
||||||
v 0.499000 -0.499000 -0.499000
|
|
||||||
v 0.499000 1.499000 -0.499000
|
v 0.499000 1.499000 -0.499000
|
||||||
v 0.499000 -0.499000 -0.375000
|
|
||||||
v 0.499000 1.499000 -0.375000
|
v 0.499000 1.499000 -0.375000
|
||||||
|
v 0.499000 -0.499000 -0.375000
|
||||||
|
v 0.499000 -0.499000 -0.499000
|
||||||
|
v -0.499000 1.499000 -0.375000
|
||||||
|
v -0.499000 -0.499000 -0.375000
|
||||||
|
v -0.499000 1.499000 -0.499000
|
||||||
|
v -0.499000 -0.499000 -0.499000
|
||||||
|
vt 0.894736 1.000000
|
||||||
|
vt 0.947368 1.000000
|
||||||
|
vt 0.947368 0.000000
|
||||||
|
vt 0.894736 0.000000
|
||||||
vt 0.842105 1.000000
|
vt 0.842105 1.000000
|
||||||
vt 0.842105 0.000000
|
|
||||||
vt 0.894737 0.000000
|
|
||||||
vt 0.894737 1.000000
|
|
||||||
vt 0.421053 1.000000
|
vt 0.421053 1.000000
|
||||||
vt 0.421053 0.000000
|
vt 0.421053 0.000000
|
||||||
vt 0.947368 0.000000
|
vt 0.842105 0.000000
|
||||||
vt 0.947368 1.000000
|
vt 0.842105 1.000000
|
||||||
|
vt 0.894736 1.000000
|
||||||
|
vt 0.894736 0.000000
|
||||||
|
vt 0.842105 0.000000
|
||||||
|
vt 0.421053 1.000000
|
||||||
vt 0.000000 1.000000
|
vt 0.000000 1.000000
|
||||||
vt 0.000000 0.000000
|
vt 0.000000 0.000000
|
||||||
vt 1.000000 0.000000
|
vt 0.421053 0.000000
|
||||||
vt 1.000000 0.500000
|
vt 1.000000 0.500000
|
||||||
vt 0.947368 0.500000
|
vt 0.947368 0.500000
|
||||||
|
vt 0.947368 1.000000
|
||||||
vt 1.000000 1.000000
|
vt 1.000000 1.000000
|
||||||
vn -1.000000 0.000000 0.000000
|
vt 1.000000 0.000000
|
||||||
vn 0.000000 0.000000 1.000000
|
vt 0.947368 0.000000
|
||||||
vn 1.000000 0.000000 0.000000
|
vt 0.947368 0.500000
|
||||||
vn 0.000000 0.000000 -1.000000
|
vt 1.000000 0.500000
|
||||||
vn 0.000000 -1.000000 0.000000
|
vn 1.0000 0.0000 0.0000
|
||||||
vn 0.000000 1.000000 0.000000
|
vn 0.0000 -0.0000 1.0000
|
||||||
usemtl None
|
vn -1.0000 0.0000 0.0000
|
||||||
s off
|
vn 0.0000 0.0000 -1.0000
|
||||||
f 2/1/1 1/2/1 3/3/1 4/4/1
|
vn 0.0000 -1.0000 0.0000
|
||||||
f 4/5/2 3/6/2 7/2/2 8/1/2
|
vn 0.0000 1.0000 0.0000
|
||||||
f 8/4/3 7/3/3 5/7/3 6/8/3
|
usemtl None.007
|
||||||
f 6/9/4 5/10/4 1/6/4 2/5/4
|
s 1
|
||||||
f 1/11/5 5/12/5 7/13/5 3/7/5
|
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||||
f 6/8/6 2/13/6 4/12/6 8/14/6
|
f 2/5/2 5/6/2 6/7/2 3/8/2
|
||||||
|
f 5/9/3 7/10/3 8/11/3 6/12/3
|
||||||
|
f 7/13/4 1/14/4 4/15/4 8/16/4
|
||||||
|
f 4/17/5 3/18/5 6/19/5 8/20/5
|
||||||
|
f 7/21/6 5/22/6 2/23/6 1/24/6
|
||||||
|
50
mods/doors/models/door_b2.obj
Normal file
50
mods/doors/models/door_b2.obj
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# Blender v2.79 (sub 0) OBJ File: ''
|
||||||
|
# www.blender.org
|
||||||
|
mtllib door_b2.mtl
|
||||||
|
o door_b2
|
||||||
|
v 0.499000 1.499000 -0.499000
|
||||||
|
v 0.499000 1.499000 -0.375000
|
||||||
|
v 0.499000 -0.499000 -0.375000
|
||||||
|
v 0.499000 -0.499000 -0.499000
|
||||||
|
v -0.499000 1.499000 -0.375000
|
||||||
|
v -0.499000 -0.499000 -0.375000
|
||||||
|
v -0.499000 1.499000 -0.499000
|
||||||
|
v -0.499000 -0.499000 -0.499000
|
||||||
|
vt 0.842105 1.000000
|
||||||
|
vt 0.894737 1.000000
|
||||||
|
vt 0.894737 0.000000
|
||||||
|
vt 0.842105 0.000000
|
||||||
|
vt 0.421052 1.000000
|
||||||
|
vt 0.000001 1.000000
|
||||||
|
vt 0.000001 0.000000
|
||||||
|
vt 0.421052 0.000000
|
||||||
|
vt 0.894737 1.000000
|
||||||
|
vt 0.947368 1.000000
|
||||||
|
vt 0.947368 0.000000
|
||||||
|
vt 0.894737 0.000000
|
||||||
|
vt 0.842105 1.000000
|
||||||
|
vt 0.421052 1.000000
|
||||||
|
vt 0.421052 0.000000
|
||||||
|
vt 0.842105 0.000000
|
||||||
|
vt 1.000000 0.500000
|
||||||
|
vt 0.947368 0.500000
|
||||||
|
vt 0.947368 1.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 0.947368 0.000000
|
||||||
|
vt 0.947368 0.500000
|
||||||
|
vt 1.000000 0.500000
|
||||||
|
vn 1.0000 0.0000 0.0000
|
||||||
|
vn 0.0000 -0.0000 1.0000
|
||||||
|
vn -1.0000 0.0000 0.0000
|
||||||
|
vn 0.0000 0.0000 -1.0000
|
||||||
|
vn 0.0000 -1.0000 0.0000
|
||||||
|
vn 0.0000 1.0000 0.0000
|
||||||
|
usemtl None.010
|
||||||
|
s 1
|
||||||
|
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||||
|
f 2/5/2 5/6/2 6/7/2 3/8/2
|
||||||
|
f 5/9/3 7/10/3 8/11/3 6/12/3
|
||||||
|
f 7/13/4 1/14/4 4/15/4 8/16/4
|
||||||
|
f 4/17/5 3/18/5 6/19/5 8/20/5
|
||||||
|
f 7/21/6 5/22/6 2/23/6 1/24/6
|
Loading…
Reference in New Issue
Block a user