Cinematic camera core functionality. Patch by Vladislav Belov.

Based on existing code that was still around from an old(not working)
implementation.
Supports basic control from trigger scirpts (queue, start and stop
camera paths) and works in multiplayer.

This was SVN commit r17594.
This commit is contained in:
Yves
2016-01-03 12:41:04 +00:00
parent d313a1934a
commit 89aef0b6eb
30 changed files with 1110 additions and 341 deletions
+13 -17
View File
@@ -408,27 +408,25 @@ void CMapWriter::WriteXML(const VfsPath& filename,
for ( ; it != paths.end(); ++it )
{
CStrW name = it->first;
float timescale = it->second.GetTimescale();
XML_Element("Path");
XML_Attribute("name", name);
XML_Attribute("timescale", timescale);
fixed timescale = it->second.GetTimescale();
const std::vector<SplineData>& nodes = it->second.GetAllNodes();
const CCinemaData* data = it->second.GetData();
{
XML_Element("Distortion");
XML_Attribute("mode", data->m_Mode);
XML_Attribute("style", data->m_Style);
XML_Attribute("growth", data->m_Growth);
XML_Attribute("switch", data->m_Switch);
}
XML_Element("Path");
XML_Attribute("name", data->m_Name);
XML_Attribute("timescale", timescale);
XML_Attribute("orientation", data->m_Orientation);
XML_Attribute("mode", data->m_Mode);
XML_Attribute("style", data->m_Style);
for ( ssize_t j=nodes.size()-1; j >= 0; --j )
// TODO: write target nodes
for (size_t j = 0; j < nodes.size(); ++j)
{
XML_Element("Node");
if (j > 0)
XML_Attribute("deltatime", nodes[j - 1].Distance);
else
XML_Attribute("deltatime", 0.0f);
{
XML_Element("Position");
@@ -443,8 +441,6 @@ void CMapWriter::WriteXML(const VfsPath& filename,
XML_Attribute("y", nodes[j].Rotation.Y);
XML_Attribute("z", nodes[j].Rotation.Z);
}
XML_Setting("Time", nodes[j].Distance);
}
}
}