From 421f5e5fdd99b3e92ad956db3be6bd42fc607576 Mon Sep 17 00:00:00 2001 From: grumbel Date: Sat, 28 Nov 2009 23:03:45 +0000 Subject: [PATCH] If speed-y isn't given, use speed git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6153 837edb03-e0f3-0310-88ca-d4d4e8b29345 --- src/object/background.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/object/background.cpp b/src/object/background.cpp index f74b748ba..b403f3fe5 100644 --- a/src/object/background.cpp +++ b/src/object/background.cpp @@ -60,7 +60,11 @@ Background::Background(const Reader& reader) : throw std::runtime_error("Must specify image and speed for background"); set_image(imagefile, speed); - reader.get("speed-y", speed_y); + if (!reader.get("speed-y", speed_y)) + { + speed_y = speed; + } + if (reader.get("image-top", imagefile_top)) { image_top = Surface::create(imagefile_top); } -- 2.11.0