From 09dfa613ae4493d2041ed155c27c139bccf803ae Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 2 Jul 2004 15:12:48 +0000 Subject: [PATCH] save spawnpoints SVN-Revision: 1527 --- src/sector.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/sector.cpp b/src/sector.cpp index 78c45bd50..ce8e7e9d4 100644 --- a/src/sector.cpp +++ b/src/sector.cpp @@ -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 (*i); -- 2.11.0