From 90a7bd6a0afb6509e96bcb373f95b448ee7f3b1d Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 20 Apr 2021 17:50:03 +0000 Subject: Put torch/signlike node on floor if no paramtype2 (#11074) --- src/client/wieldmesh.cpp | 10 ++++++---- src/mapnode.cpp | 5 ++++- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/client/wieldmesh.cpp b/src/client/wieldmesh.cpp index e76bbfa9e..d9d5e57cd 100644 --- a/src/client/wieldmesh.cpp +++ b/src/client/wieldmesh.cpp @@ -313,12 +313,14 @@ static scene::SMesh *createSpecialNodeMesh(Client *client, MapNode n, // keep it } else if (f.param_type_2 == CPT2_WALLMOUNTED || f.param_type_2 == CPT2_COLORED_WALLMOUNTED) { - if (f.drawtype == NDT_TORCHLIKE) - n.setParam2(1); - else if (f.drawtype == NDT_SIGNLIKE || + if (f.drawtype == NDT_TORCHLIKE || + f.drawtype == NDT_SIGNLIKE || f.drawtype == NDT_NODEBOX || - f.drawtype == NDT_MESH) + f.drawtype == NDT_MESH) { n.setParam2(4); + } + } else if (f.drawtype == NDT_SIGNLIKE || f.drawtype == NDT_TORCHLIKE) { + n.setParam2(1); } gen.renderSingle(n.getContent(), n.getParam2()); diff --git a/src/mapnode.cpp b/src/mapnode.cpp index 20980b238..c885bfe1d 100644 --- a/src/mapnode.cpp +++ b/src/mapnode.cpp @@ -159,8 +159,11 @@ u8 MapNode::getWallMounted(const NodeDefManager *nodemgr) const { const ContentFeatures &f = nodemgr->get(*this); if (f.param_type_2 == CPT2_WALLMOUNTED || - f.param_type_2 == CPT2_COLORED_WALLMOUNTED) + f.param_type_2 == CPT2_COLORED_WALLMOUNTED) { return getParam2() & 0x07; + } else if (f.drawtype == NDT_SIGNLIKE || f.drawtype == NDT_TORCHLIKE) { + return 1; + } return 0; } -- cgit v1.2.3