diff --git a/data/stk_config.xml b/data/stk_config.xml
index a2e4e4d2d..84d3c09c0 100644
--- a/data/stk_config.xml
+++ b/data/stk_config.xml
@@ -145,7 +145,7 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sources.cmake b/sources.cmake
index 81ebb999d..c054f1b47 100644
--- a/sources.cmake
+++ b/sources.cmake
@@ -1,6 +1,5 @@
# Modify this file to change the last-modified date when you add/remove a file.
-# This will then trigger a new cmake run automatically.
+# This will then trigger a new cmake run automatically.
file(GLOB_RECURSE STK_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.hpp")
file(GLOB_RECURSE STK_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.cpp")
-file(GLOB_RECURSE STK_SHADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "data/shaders/*")
-
+file(GLOB_RECURSE STK_SHADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "data/shaders/*")
\ No newline at end of file
diff --git a/src/config/stk_config.cpp b/src/config/stk_config.cpp
index c904349de..70878d778 100644
--- a/src/config/stk_config.cpp
+++ b/src/config/stk_config.cpp
@@ -50,6 +50,13 @@ STKConfig::~STKConfig()
if(m_default_kart_properties)
delete m_default_kart_properties;
+
+ for(std::map::iterator it = m_kart_properties.begin();
+ it != m_kart_properties.end(); ++it)
+ {
+ if (it->second)
+ delete it->second;
+ }
} // ~STKConfig
//-----------------------------------------------------------------------------
@@ -380,6 +387,15 @@ void STKConfig::getAllData(const XMLNode * root)
throw std::runtime_error(msg.str());
}
m_default_kart_properties->getAllData(node);
+ const XMLNode *types = node->getNode("kart-type");
+
+ for (unsigned int i = 0; i < types->getNumNodes(); ++i)
+ {
+ const XMLNode* type = types->getNode(i);
+ m_kart_properties[type->getName()] = new KartProperties();
+ m_kart_properties[type->getName()]->copyFrom(m_default_kart_properties);
+ m_kart_properties[type->getName()]->getAllData(type);
+ }
} // getAllData
diff --git a/src/config/stk_config.hpp b/src/config/stk_config.hpp
index 3ccbc82f5..0a94d3db8 100644
--- a/src/config/stk_config.hpp
+++ b/src/config/stk_config.hpp
@@ -30,6 +30,7 @@
#include
#include
+#include