projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Refactored worldmap a bit to reuse GameObject from the rest of the game
[supertux.git]
/
src
/
sector.cpp
diff --git
a/src/sector.cpp
b/src/sector.cpp
index
cc1689b
..
11957a4
100644
(file)
--- a/
src/sector.cpp
+++ b/
src/sector.cpp
@@
-46,6
+46,7
@@
#include "collision_grid_iterator.h"
#include "object_factory.h"
#include "collision.h"
#include "collision_grid_iterator.h"
#include "object_factory.h"
#include "collision.h"
+#include "spawn_point.h"
#include "math/rect.h"
#include "math/aatriangle.h"
#include "object/coin.h"
#include "math/rect.h"
#include "math/aatriangle.h"
#include "object/coin.h"
@@
-145,12
+146,7
@@
Sector::parse(const lisp::Lisp& sector)
iter.value()->get(song_title);
load_music();
} else if(token == "spawnpoint") {
iter.value()->get(song_title);
load_music();
} else if(token == "spawnpoint") {
- const lisp::Lisp* spawnpoint_lisp = iter.lisp();
-
- SpawnPoint* sp = new SpawnPoint;
- spawnpoint_lisp->get("name", sp->name);
- spawnpoint_lisp->get("x", sp->pos.x);
- spawnpoint_lisp->get("y", sp->pos.y);
+ SpawnPoint* sp = new SpawnPoint(iter.lisp());
spawnpoints.push_back(sp);
} else if(token == "init-script") {
iter.value()->get(init_script);
spawnpoints.push_back(sp);
} else if(token == "init-script") {
iter.value()->get(init_script);