From 133b63b473167e10ed994931cc7a5296d92650e6 Mon Sep 17 00:00:00 2001 From: LMH Date: Tue, 13 Aug 2013 13:51:23 -1000 Subject: [PATCH] Set default behavior for red potion powerups to flip level --- src/object/powerup.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/object/powerup.cpp b/src/object/powerup.cpp index a70560f31..927001b62 100644 --- a/src/object/powerup.cpp +++ b/src/object/powerup.cpp @@ -17,6 +17,7 @@ #include "audio/sound_manager.hpp" #include "object/player.hpp" #include "object/powerup.hpp" +#include "scripting/level.hpp" #include "supertux/object_factory.hpp" #include "supertux/sector.hpp" #include "sprite/sprite.hpp" @@ -96,6 +97,8 @@ PowerUp::collision(GameObject& other, const CollisionHit&) player->make_invincible(); } else if (sprite_name == "images/powerups/1up/1up.sprite") { player->get_status()->add_coins(100); + } else if (sprite_name == "images/powerups/potions/red-potion.sprite") { + scripting::Level_flip_vertically(); } remove_me(); -- 2.11.0