summaryrefslogtreecommitdiff
path: root/src/mapblock_mesh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapblock_mesh.cpp')
-rw-r--r--src/mapblock_mesh.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp
index a11fb5887..00f83e7ab 100644
--- a/src/mapblock_mesh.cpp
+++ b/src/mapblock_mesh.cpp
@@ -1033,7 +1033,7 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data, v3s16 camera_offset):
m_enable_shaders = data->m_use_shaders;
m_use_tangent_vertices = data->m_use_tangent_vertices;
m_enable_vbo = g_settings->getBool("enable_vbo");
-
+
if (g_settings->getBool("enable_minimap")) {
m_minimap_mapblock = new MinimapMapblock;
m_minimap_mapblock->getMinimapNodes(
@@ -1298,10 +1298,8 @@ bool MapBlockMesh::animate(bool faraway, float time, int crack, u32 daynight_rat
// Cracks
if(crack != m_last_crack)
{
- for(std::map<u32, std::string>::iterator
- i = m_crack_materials.begin();
- i != m_crack_materials.end(); ++i)
- {
+ for (UNORDERED_MAP<u32, std::string>::iterator i = m_crack_materials.begin();
+ i != m_crack_materials.end(); ++i) {
scene::IMeshBuffer *buf = m_mesh->getMeshBuffer(i->first);
std::string basename = i->second;
@@ -1315,9 +1313,9 @@ bool MapBlockMesh::animate(bool faraway, float time, int crack, u32 daynight_rat
// If the current material is also animated,
// update animation info
- std::map<u32, TileSpec>::iterator anim_iter =
- m_animation_tiles.find(i->first);
- if(anim_iter != m_animation_tiles.end()){
+ UNORDERED_MAP<u32, TileSpec>::iterator anim_iter =
+ m_animation_tiles.find(i->first);
+ if (anim_iter != m_animation_tiles.end()){
TileSpec &tile = anim_iter->second;
tile.texture = new_texture;
tile.texture_id = new_texture_id;
@@ -1330,10 +1328,8 @@ bool MapBlockMesh::animate(bool faraway, float time, int crack, u32 daynight_rat
}
// Texture animation
- for(std::map<u32, TileSpec>::iterator
- i = m_animation_tiles.begin();
- i != m_animation_tiles.end(); ++i)
- {
+ for (UNORDERED_MAP<u32, TileSpec>::iterator i = m_animation_tiles.begin();
+ i != m_animation_tiles.end(); ++i) {
const TileSpec &tile = i->second;
// Figure out current frame
int frameoffset = m_animation_frame_offsets[i->first];
@@ -1443,7 +1439,7 @@ void MeshCollector::append(const TileSpec &tile,
vertices[i].Color, vertices[i].TCoords);
p->vertices.push_back(vert);
}
- }
+ }
for (u32 i = 0; i < numIndices; i++) {
u32 j = indices[i] + vertex_count;
@@ -1499,7 +1495,7 @@ void MeshCollector::append(const TileSpec &tile,
vertices[i].Normal, c, vertices[i].TCoords);
p->vertices.push_back(vert);
}
- }
+ }
for (u32 i = 0; i < numIndices; i++) {
u32 j = indices[i] + vertex_count;