Skip to content

Commit

Permalink
Convert door model to B3D (#2906)
Browse files Browse the repository at this point in the history
Using a B3D model I worked out that it would be possible to have only two models (instead of the current four) for the doors and still keep all the mirroring correct when the door is open/closed.
  • Loading branch information
An0n3m0us committed Dec 12, 2021
1 parent ad183c4 commit 3aaabce
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 194 deletions.
8 changes: 4 additions & 4 deletions mods/doors/init.lua
Expand Up @@ -448,16 +448,16 @@ function doors.register(name, def)
def.collision_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}}
def.use_texture_alpha = "clip"

def.mesh = "door_a.obj"
def.mesh = "door_a.b3d"
minetest.register_node(":" .. name .. "_a", table.copy(def))

def.mesh = "door_b.obj"
def.mesh = "door_b.b3d"
minetest.register_node(":" .. name .. "_b", table.copy(def))

def.mesh = "door_a2.obj"
def.mesh = "door_b.b3d"
minetest.register_node(":" .. name .. "_c", table.copy(def))

def.mesh = "door_b2.obj"
def.mesh = "door_a.b3d"
minetest.register_node(":" .. name .. "_d", table.copy(def))

doors.registered_doors[name .. "_a"] = true
Expand Down
Binary file added mods/doors/models/door.blend
Binary file not shown.
Binary file added mods/doors/models/door_a.b3d
Binary file not shown.
40 changes: 0 additions & 40 deletions mods/doors/models/door_a.obj

This file was deleted.

50 changes: 0 additions & 50 deletions mods/doors/models/door_a2.obj

This file was deleted.

Binary file added mods/doors/models/door_b.b3d
Binary file not shown.
50 changes: 0 additions & 50 deletions mods/doors/models/door_b.obj

This file was deleted.

50 changes: 0 additions & 50 deletions mods/doors/models/door_b2.obj

This file was deleted.

0 comments on commit 3aaabce

Please sign in to comment.