@@ -193,41 +193,43 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
193
193
(p.Z >= 0 ) & (p.Z < MAP_BLOCKSIZE)) {
194
194
195
195
MapNode n = data->m_vmanip .getNodeNoEx (blockpos_nodes + p);
196
- // Get selection mesh light level
197
- static const v3s16 dirs[7 ] = {
198
- v3s16 ( 0 , 0 , 0 ),
199
- v3s16 ( 0 , 1 , 0 ),
200
- v3s16 ( 0 ,-1 , 0 ),
201
- v3s16 ( 1 , 0 , 0 ),
202
- v3s16 (-1 , 0 , 0 ),
203
- v3s16 ( 0 , 0 , 1 ),
204
- v3s16 ( 0 , 0 ,-1 )
205
- };
196
+ if (n.getContent () != CONTENT_AIR) {
Has a conversation. Original line has a conversation.
197
+ // Get selection mesh light level
198
+ static const v3s16 dirs[7 ] = {
199
+ v3s16 ( 0 , 0 , 0 ),
200
+ v3s16 ( 0 , 1 , 0 ),
201
+ v3s16 ( 0 ,-1 , 0 ),
202
+ v3s16 ( 1 , 0 , 0 ),
203
+ v3s16 (-1 , 0 , 0 ),
204
+ v3s16 ( 0 , 0 , 1 ),
205
+ v3s16 ( 0 , 0 ,-1 )
206
+ };
206
207
207
- u16 l = 0 ;
208
- u16 l1 = 0 ;
209
- for (u8 i = 0 ; i < 7 ; i++) {
210
- MapNode n1 = data->m_vmanip .getNodeNoEx (blockpos_nodes + p + dirs[i]);
211
- l1 = getInteriorLight (n1, -4 , nodedef);
212
- if (l1 > l)
213
- l = l1;
214
- }
215
- video::SColor c = MapBlock_LightColor (255 , l, 0 );
216
- data->m_highlight_mesh_color = c;
217
- std::vector<aabb3f> boxes = n.getSelectionBoxes (nodedef);
218
- TileSpec h_tile;
219
- h_tile.material_flags |= MATERIAL_FLAG_HIGHLIGHTED;
220
- h_tile.texture = tsrc->getTexture (" halo.png" ,&h_tile.texture_id );
221
- v3f pos = intToFloat (p, BS);
222
- f32 d = 0.05 * BS;
223
- for (std::vector<aabb3f>::iterator
224
- i = boxes.begin ();
225
- i != boxes.end (); i++)
226
- {
227
- aabb3f box = *i;
228
- box.MinEdge += v3f (-d, -d, -d) + pos;
229
- box.MaxEdge += v3f (d, d, d) + pos;
230
- makeCuboid (&collector, box, &h_tile, 1 , c, NULL );
208
+ u16 l = 0 ;
209
+ u16 l1 = 0 ;
210
+ for (u8 i = 0 ; i < 7 ; i++) {
211
+ MapNode n1 = data->m_vmanip .getNodeNoEx (blockpos_nodes + p + dirs[i]);
212
+ l1 = getInteriorLight (n1, -4 , nodedef);
213
+ if (l1 > l)
214
+ l = l1;
215
+ }
216
+ video::SColor c = MapBlock_LightColor (255 , l, 0 );
217
+ data->m_highlight_mesh_color = c;
218
+ std::vector<aabb3f> boxes = n.getSelectionBoxes (nodedef);
219
+ TileSpec h_tile;
220
+ h_tile.material_flags |= MATERIAL_FLAG_HIGHLIGHTED;
221
+ h_tile.texture = tsrc->getTexture (" halo.png" ,&h_tile.texture_id );
222
+ v3f pos = intToFloat (p, BS);
223
+ f32 d = 0.05 * BS;
224
+ for (std::vector<aabb3f>::iterator
225
+ i = boxes.begin ();
226
+ i != boxes.end (); i++)
227
+ {
228
+ aabb3f box = *i;
229
+ box.MinEdge += v3f (-d, -d, -d) + pos;
230
+ box.MaxEdge += v3f (d, d, d) + pos;
231
+ makeCuboid (&collector, box, &h_tile, 1 , c, NULL );
232
+ }
231
233
}
232
234
}
233
235