X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fbadguy%2Ftotem.cpp;h=2f1327d11b1a661f360f858279eb4bdc883fb4d5;hb=126aa9428c83eb1e17d4a75a55d15e3e6e0c6875;hp=2ee60f16a4024db412cfd115987dc20f089d9194;hpb=2892ebda09d24c977547159e34abf0244884b89e;p=supertux.git diff --git a/src/badguy/totem.cpp b/src/badguy/totem.cpp index 2ee60f16a..2f1327d11 100644 --- a/src/badguy/totem.cpp +++ b/src/badguy/totem.cpp @@ -90,7 +90,7 @@ Totem::active_update(float elapsed_time) BadGuy::active_update(elapsed_time); if (!carried_by) { - if (might_fall()) + if (on_ground() && might_fall()) { dir = (dir == LEFT ? RIGHT : LEFT); activate(); @@ -154,6 +154,8 @@ Totem::collision_squished(Player& player) void Totem::collision_solid(const CollisionHit& hit) { + update_on_ground_flag(hit); + // if we are being carried around, pass event to bottom of stack and ignore it if (carried_by) { carried_by->collision_solid(hit);