This will account for a change in the hitbox when chaning the sprite. As a
result, the dead Crystallo no longer appears to be a few pixels within the tile
he was standing on.
SVN-Revision: 6426
#include "sprite/sprite.hpp"
#include "supertux/object_factory.hpp"
#include "util/reader.hpp"
+#include "object/anchor_point.hpp"
Crystallo::Crystallo(const Reader& reader) :
WalkingBadguy(reader, "images/creatures/crystallo/crystallo.sprite", "left", "right"),
bool
Crystallo::collision_squished(GameObject& object)
{
- sprite->set_action(dir == LEFT ? "shattered-left" : "shattered-right");
+ this->set_action(dir == LEFT ? "shattered-left" : "shattered-right", /* loops = */ -1, ANCHOR_BOTTOM);
kill_squished(object);
return true;
}