Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Ryan Newell 2014-10-20 13:23:41 -07:00
commit 2d01df9b45
1 changed files with 11 additions and 5 deletions

View File

@ -171,6 +171,12 @@ ContentFeatures::ContentFeatures()
ContentFeatures::~ContentFeatures()
{
#ifndef SERVER
for (u32 i = 0; i < 24; i++) {
if (mesh_ptr[i])
mesh_ptr[i]->drop();
}
#endif
}
void ContentFeatures::reset()
@ -851,12 +857,12 @@ void CNodeDefManager::updateTextures(IGameDef *gamedef)
//Cache 6dfacedir rotated clones of meshes
if (f->mesh_ptr[0] && (f->param_type_2 == CPT2_FACEDIR)) {
for (u16 j = 1; j < 24; j++) {
f->mesh_ptr[j] = cloneMesh(f->mesh_ptr[0]);
rotateMeshBy6dFacedir(f->mesh_ptr[j], j);
recalculateBoundingBox(f->mesh_ptr[j]);
}
for (u16 j = 1; j < 24; j++) {
f->mesh_ptr[j] = cloneMesh(f->mesh_ptr[0]);
rotateMeshBy6dFacedir(f->mesh_ptr[j], j);
recalculateBoundingBox(f->mesh_ptr[j]);
}
}
}
#endif
}