X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fskull_tile.cpp;h=7721a5b648c82cd932e4b448d5d87ff670ebba00;hb=555d1b7bebb45326d82d934e07463209837309b0;hp=814309393fb42f2dddeb098b1ad069c83e6ad4fc;hpb=8a627e73d824b5a14249cfe066dc2fdc643ce28d;p=supertux.git diff --git a/src/object/skull_tile.cpp b/src/object/skull_tile.cpp index 814309393..7721a5b64 100644 --- a/src/object/skull_tile.cpp +++ b/src/object/skull_tile.cpp @@ -28,13 +28,12 @@ #include "sprite/sprite.hpp" #include "random_generator.hpp" -static const float CRACKTIME = 0.3; -static const float FALLTIME = 0.8; +static const float CRACKTIME = 0.3f; +static const float FALLTIME = 0.8f; SkullTile::SkullTile(const lisp::Lisp& lisp) - : MovingSprite(lisp, "images/objects/skull_tile/skull_tile.sprite", LAYER_TILES, COLGROUP_STATIC), hit(false), falling(false) + : MovingSprite(lisp, "images/objects/skull_tile/skull_tile.sprite", LAYER_TILES, COLGROUP_STATIC), hit(false), falling(false) { - set_solid(true); } HitResponse @@ -51,7 +50,7 @@ void SkullTile::draw(DrawingContext& context) { Vector pos = get_pos(); - // shacking + // shaking if(timer.get_timegone() > CRACKTIME) { pos.x += systemRandom.rand(-3, 3); } @@ -72,7 +71,6 @@ SkullTile::update(float elapsed_time) if(timer.check()) { falling = true; physic.enable_gravity(true); - set_solid(false); timer.stop(); } else if(!timer.started()) { timer.start(FALLTIME);