From: Christoph Sommer Date: Mon, 22 May 2006 22:50:01 +0000 (+0000) Subject: Made fish jump again X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=27e0a9aca7864c2daae2b7123b0b96526b86af53;p=supertux.git Made fish jump again SVN-Revision: 3568 --- diff --git a/src/badguy/fish.cpp b/src/badguy/fish.cpp index ebd14c379..41af7241d 100644 --- a/src/badguy/fish.cpp +++ b/src/badguy/fish.cpp @@ -22,6 +22,7 @@ #include "fish.hpp" #include "tile.hpp" #include "object/tilemap.hpp" +#include "log.hpp" static const float FISH_JUMP_POWER = 600; static const float FISH_WAIT_TIME = 1; @@ -83,7 +84,7 @@ Fish::hit(const CollisionHit& chit) void Fish::collision_tile(uint32_t tile_attributes) { - if(tile_attributes & Tile::WATER) { + if ((tile_attributes & Tile::WATER) && (physic.get_velocity_y() <= 0)) { start_waiting(); movement = Vector(0, 0); }