X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fbadguy%2Fstalactite.cpp;h=784d262d6285e0a8ea20bc2eb2e969b35a395bdb;hb=864c93e01ec366f730b3ebad08d5c52d6a9363b6;hp=788683ba8ee6fe4dc96768ab4f75e3a01e68a969;hpb=495f8b77cb935fe8eff81bec755efca8e34e8a99;p=supertux.git diff --git a/src/badguy/stalactite.cpp b/src/badguy/stalactite.cpp index 788683ba8..784d262d6 100644 --- a/src/badguy/stalactite.cpp +++ b/src/badguy/stalactite.cpp @@ -1,3 +1,23 @@ +// $Id$ +// +// SuperTux +// Copyright (C) 2005 Matthias Braun +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +// 02111-1307, USA. + #include #include "stalactite.h" @@ -82,6 +102,9 @@ Stalactite::kill_fall() void Stalactite::draw(DrawingContext& context) { + if(get_state() != STATE_ACTIVE) + return; + if(state == STALACTITE_SHAKING) { sprite->draw(context, get_pos() + Vector((rand() % 6)-3, 0), LAYER_OBJECTS); } else {