From: Matthias Braun Date: Fri, 2 Jul 2004 15:12:48 +0000 (+0000) Subject: save spawnpoints X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=09dfa613ae4493d2041ed155c27c139bccf803ae;p=supertux.git save spawnpoints SVN-Revision: 1527 --- 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);