Zippers are now stored as their own node, and not as
attributes only. Track version number was increased to 4, but old version 3 tracks can still be read. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7542 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
<!-- Minimum and maxium track versions that be be read by this binary.
|
||||
Older versions will be ignored. -->
|
||||
<track-version min="3" max="3"/>
|
||||
<track-version min="3" max="4"/>
|
||||
|
||||
<!-- Maximum number of karts to be used at the same time. This limit
|
||||
can easily be increased, but some tracks might not have valid start
|
||||
|
||||
@@ -87,6 +87,9 @@ Material::Material(const XMLNode *node, int index)
|
||||
else if (s != "none") fprintf(stderr, "[Material] WARNING: Unknown compositing mode '%s'\n", s.c_str());
|
||||
}
|
||||
|
||||
// Compatibility to track version 3, which stored zipper data
|
||||
// as attributes. Can be removed if track version 3 is not
|
||||
// supported anymore
|
||||
node->get("zipper", &m_zipper );
|
||||
node->get("zipper-duration", &m_zipper_duration );
|
||||
node->get("zipper-fade-out-time", &m_zipper_fade_out_time );
|
||||
@@ -108,6 +111,15 @@ Material::Material(const XMLNode *node, int index)
|
||||
{
|
||||
initParticlesEffect(child_node);
|
||||
}
|
||||
else if (child_node->getName() == "zipper")
|
||||
{
|
||||
// Track version 4 uses a separate node:
|
||||
m_zipper = true;
|
||||
child_node->get("duration", &m_zipper_duration );
|
||||
child_node->get("fade-out-time", &m_zipper_fade_out_time );
|
||||
child_node->get("max-speed-increase",&m_zipper_max_speed_increase);
|
||||
child_node->get("speed-gain", &m_zipper_speed_gain );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "[Material] WARNING: unknown node type '%s' for texture '%s' - ignored.\n",
|
||||
|
||||
Reference in New Issue
Block a user