aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/content_mapblock.cpp4
-rw-r--r--src/client/game.cpp8
2 files changed, 10 insertions, 2 deletions
diff --git a/src/client/content_mapblock.cpp b/src/client/content_mapblock.cpp
index 0bac5e827..7fd5aefb1 100644
--- a/src/client/content_mapblock.cpp
+++ b/src/client/content_mapblock.cpp
@@ -1510,7 +1510,9 @@ void MapblockMeshGenerator::drawMeshNode()
int degrotate = 0;
if (f->param_type_2 == CPT2_FACEDIR ||
- f->param_type_2 == CPT2_COLORED_FACEDIR) {
+ f->param_type_2 == CPT2_COLORED_FACEDIR ||
+ f->param_type_2 == CPT2_4DIR ||
+ f->param_type_2 == CPT2_COLORED_4DIR) {
facedir = n.getFaceDir(nodedef);
} else if (f->param_type_2 == CPT2_WALLMOUNTED ||
f->param_type_2 == CPT2_COLORED_WALLMOUNTED) {
diff --git a/src/client/game.cpp b/src/client/game.cpp
index 6a4bff61a..b4926d9bf 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -3462,7 +3462,9 @@ bool Game::nodePlacement(const ItemDefinition &selected_def,
param2 = dir.Z < 0 ? 5 : 4;
}
} else if (predicted_f.param_type_2 == CPT2_FACEDIR ||
- predicted_f.param_type_2 == CPT2_COLORED_FACEDIR) {
+ predicted_f.param_type_2 == CPT2_COLORED_FACEDIR ||
+ predicted_f.param_type_2 == CPT2_4DIR ||
+ predicted_f.param_type_2 == CPT2_COLORED_4DIR) {
v3s16 dir = nodepos - floatToInt(client->getEnv().getLocalPlayer()->getPosition(), BS);
if (abs(dir.X) > abs(dir.Z)) {
@@ -3501,6 +3503,7 @@ bool Game::nodePlacement(const ItemDefinition &selected_def,
// Apply color
if (!place_param2 && (predicted_f.param_type_2 == CPT2_COLOR
|| predicted_f.param_type_2 == CPT2_COLORED_FACEDIR
+ || predicted_f.param_type_2 == CPT2_COLORED_4DIR
|| predicted_f.param_type_2 == CPT2_COLORED_WALLMOUNTED)) {
const auto &indexstr = selected_item.metadata.
getString("palette_index", 0);
@@ -3514,6 +3517,9 @@ bool Game::nodePlacement(const ItemDefinition &selected_def,
} else if (predicted_f.param_type_2 == CPT2_COLORED_FACEDIR) {
// param2 = pure palette index + other
param2 = (index & 0xe0) | (param2 & 0x1f);
+ } else if (predicted_f.param_type_2 == CPT2_COLORED_4DIR) {
+ // param2 = pure palette index + other
+ param2 = (index & 0xfc) | (param2 & 0x03);
}
}
}