Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-10-22 10:42:01 +0000
committerStijn Buys <ingar@osirion.org>2011-10-22 10:42:01 +0000
commit01b98a40b9c6d8ace96538342ccdd6ac46fbbbe7 (patch)
tree56cec894282f9c06a916753f258a330cbb3d1d6b /src/model/mapfile.cc
parent04ea97c5057f65c6e276c6c8b71f7c2ba32bab53 (diff)
Initial support for the Material::Origin surface flag
Diffstat (limited to 'src/model/mapfile.cc')
-rw-r--r--src/model/mapfile.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/model/mapfile.cc b/src/model/mapfile.cc
index b0f5bea..2cbee2b 100644
--- a/src/model/mapfile.cc
+++ b/src/model/mapfile.cc
@@ -169,6 +169,7 @@ MapFile::~MapFile()
void MapFile::clear_materials()
{
+ // delete primitives for each material
for (Materials::iterator mit = map_materials.begin(); mit != map_materials.end(); mit++) {
// delete list of primitives
delete(*mit).second;
@@ -176,6 +177,12 @@ void MapFile::clear_materials()
map_materials.clear();
map_collisiontriangles.clear();
+
+ // delete origin vertices
+ for (std::vector<math::Vector3f *>::iterator ovit = class_origin_vertices.begin(); ovit != class_origin_vertices.end(); ovit++) {
+ delete (*ovit);
+ }
+ class_origin_vertices.clear();
}
bool MapFile::open(std::string const & mapname)