]> git.tdb.fi Git - r2c2.git/commitdiff
Save terrain position and rotation
authorMikko Rasa <tdb@tdb.fi>
Fri, 22 Nov 2013 11:05:57 +0000 (13:05 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 22 Nov 2013 11:05:57 +0000 (13:05 +0200)
source/libr2c2/terrain.cpp

index 502a8c7e5a24e4b1eeba8da56ad26628245e3456..7b8f9f5778c3d0fe84f73f5c9cac2bd04d2029b2 100644 (file)
@@ -159,6 +159,8 @@ Terrain::NodeCoordinates Terrain::get_closest_node(const Ray &ray) const
 
 void Terrain::save(list<DataFile::Statement> &st) const
 {
+       st.push_back((DataFile::Statement("position"), position.x, position.y, position.z));
+       st.push_back((DataFile::Statement("rotation"), rotation.radians()));
        st.push_back((DataFile::Statement("size"), width, height));
        for(vector<Tile>::const_iterator i=tiles.begin(); i!=tiles.end(); ++i)
        {