save spawnpoints
authorMatthias Braun <matze@braunis.de>
Fri, 2 Jul 2004 15:12:48 +0000 (15:12 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 2 Jul 2004 15:12:48 +0000 (15:12 +0000)
SVN-Revision: 1527

src/sector.cpp

index 78c45bd..ce8e7e9 100644 (file)
@@ -267,6 +267,18 @@ Sector::write(LispWriter& writer)
   writer.write_float("gravity", gravity);
   writer.write_string("music", song_title);
 
+  // write spawnpoints
+  for(SpawnPoints::iterator i = spawnpoints.begin(); i != spawnpoints.end();
+      ++i) {
+    SpawnPoint* spawn = *i;
+    writer.start_list("playerspawn");
+    writer.write_string("name", spawn->name);
+    writer.write_float("x", spawn->pos.x);
+    writer.write_float("y", spawn->pos.y);
+    writer.end_list("playerspawn");
+  }
+
+  // write objects
   for(GameObjects::iterator i = gameobjects.begin();
       i != gameobjects.end(); ++i) {
     Serializable* serializable = dynamic_cast<Serializable*> (*i);