mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-13 21:40:19 +01:00
f600a9f645
This patch replaces the default door nodes with a new mesh model and nodes. Two new models were added that are 2 blocks high. One for left-hinge and one for right-hinge doors. This allows us to make a single texture fit on both models. The alternative would have been 1 model and 2 unmapped textures, which is more work for mod developers. Doors work exactly like the old doors, including ownership, breaking doors, opening and closing. Under the hood, we can prevent the top part of the door from being obstructed by placing an invisible node. This prevents liquids from flowing through doors or people placing sand or other blocks in the top half. The door code automatically places and removes these as needed. Metadata is used to store door state, just like the old version. A doors API is added, it allows mods to use the API to open/close or toggle door states without worrying about sounds, permissions and other details. This is intended for e.g. mesecons. This API allows mods to manipulate or inspect doors for players or for themselves. In-game old door nodes are automatically converted using an ABM and preserve ownership and orientation and state. TNT blows up all doors and trapdoors except for the steel ones, who can survive a blast. We return an itemstack in on_blast(), which requires a TNT API patch which is also pending. We enable backface culling for most of these doors, as this gives the identical visual appearance that the old doors had. In the case of the glass door, there's a slight twist. The texture files used by the new doors have new names that do not conflict with previous texture file names to avoid texture pack conflicts. Thanks to red-001 <red-001@users.noreply.github.com> for some of the conversion code, cleanups, and extra textures.
41 lines
1007 B
Plaintext
41 lines
1007 B
Plaintext
# Blender v2.76 (sub 0) OBJ File: 'door_b.blend'
|
|
# www.blender.org
|
|
mtllib door_b.mtl
|
|
o Cube_Cube.001
|
|
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 -0.499000 -0.375000
|
|
v 0.499000 1.499000 -0.375000
|
|
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 0.000000
|
|
vt 0.947368 0.000000
|
|
vt 0.947368 1.000000
|
|
vt 0.000000 1.000000
|
|
vt 0.000000 0.000000
|
|
vt 1.000000 0.000000
|
|
vt 1.000000 0.500000
|
|
vt 0.947368 0.500000
|
|
vt 1.000000 1.000000
|
|
vn -1.000000 0.000000 0.000000
|
|
vn 0.000000 0.000000 1.000000
|
|
vn 1.000000 0.000000 0.000000
|
|
vn 0.000000 0.000000 -1.000000
|
|
vn 0.000000 -1.000000 0.000000
|
|
vn 0.000000 1.000000 0.000000
|
|
usemtl None
|
|
s off
|
|
f 2/1/1 1/2/1 3/3/1 4/4/1
|
|
f 4/5/2 3/6/2 7/2/2 8/1/2
|
|
f 8/4/3 7/3/3 5/7/3 6/8/3
|
|
f 6/9/4 5/10/4 1/6/4 2/5/4
|
|
f 1/11/5 5/12/5 7/13/5 3/7/5
|
|
f 6/8/6 2/13/6 4/12/6 8/14/6
|