make crop drops work again

This commit is contained in:
darkrose 2017-07-20 00:55:48 +10:00
parent 03e7e88d1a
commit f950d0b366
2 changed files with 5 additions and 20 deletions

View File

@ -2510,25 +2510,7 @@ void meshgen_croplike(MeshMakeData *data, v3s16 p, MapNode &n, SelectedNode &sel
f32 v1 = 1.;
f32 h = 0.5;
if (f->plantlike_tiled) {
if (f->param2_type == CPT_PLANTGROWTH && n.param2 != 0 && !f->plantgrowth_on_trellis) {
h = (0.0625*(float)n.param2);
if (data->m_vmanip.getNodeRO(data->m_blockpos_nodes + p + v3s16(0,-1,0)).getContent() != n.getContent()) {
v0 = (1.0-h)/2;
}else{
v0 = ((1.0-h)/2)+0.25;
v1 = 0.75;
}
h -= 0.5;
}else if (data->m_vmanip.getNodeRO(data->m_blockpos_nodes + p + v3s16(0,-1,0)).getContent() != n.getContent()) {
v0 = 0.5;
}else if (data->m_vmanip.getNodeRO(data->m_blockpos_nodes + p + v3s16(0,1,0)).getContent() != n.getContent()) {
v1 = 0.5;
}else{
v0 = 0.25;
v1 = 0.75;
}
}else if (f->param2_type == CPT_PLANTGROWTH) {
if (f->param2_type == CPT_PLANTGROWTH) {
if (n.param2 != 0 && !f->plantgrowth_on_trellis) {
h = (0.0625*(float)n.param2);
v0 = (1.0-h);

View File

@ -3410,7 +3410,10 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
}
}
}else if (selected_node_features.param2_type == CPT_PLANTGROWTH) {
if (selected_node_features.draw_type == CDT_PLANTLIKE) {
if (
selected_node_features.draw_type == CDT_PLANTLIKE
|| selected_node_features.draw_type == CDT_CROPLIKE
) {
if (p2 && p2 < 8) {
if (selected_node_features.plantgrowth_small_dug_node != CONTENT_IGNORE) {
u16 count = 1;