Various objects: Use "reader_get_layer" to parse the "z-pos" and "layer" options.
[supertux.git] / src / object / ghost_particle_system.cpp
index 17ddcf4..b5373cb 100644 (file)
@@ -47,7 +47,7 @@ GhostParticleSystem::GhostParticleSystem()
 void
 GhostParticleSystem::parse(const Reader& reader)
 {
-  reader.get("z-pos", z_pos);
+  z_pos = reader_get_layer (reader, /* default = */ LAYER_BACKGROUND1);
 }
 
 GhostParticleSystem::~GhostParticleSystem()