X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fbadguy%2Fskullyhop.cpp;h=a5ba2caf04a54400c3f5cc0f35c7bf8e8f716cb8;hb=7c2f8e23f9accd00bd9ee2319da8ab8aa341c7cf;hp=fb12d75193c4c3ee6d238d5364d06fd9fded65f7;hpb=36afad72b6c66d4619372892f589a4131afed638;p=supertux.git diff --git a/src/badguy/skullyhop.cpp b/src/badguy/skullyhop.cpp index fb12d7519..a5ba2caf0 100644 --- a/src/badguy/skullyhop.cpp +++ b/src/badguy/skullyhop.cpp @@ -32,14 +32,11 @@ namespace { SkullyHop::SkullyHop(const lisp::Lisp& reader) : BadGuy(reader, "images/creatures/skullyhop/skullyhop.sprite") { - has_initial_direction = false; } SkullyHop::SkullyHop(const Vector& pos, Direction d) - : BadGuy(pos, "images/creatures/skullyhop/skullyhop.sprite") + : BadGuy(pos, d, "images/creatures/skullyhop/skullyhop.sprite") { - has_initial_direction = true; - initial_direction = d; } void @@ -54,8 +51,6 @@ SkullyHop::write(lisp::Writer& writer) void SkullyHop::activate() { - if (has_initial_direction) dir = initial_direction; - // initial state is JUMPING, because we might start airborne state = JUMPING; sprite->set_action(dir == LEFT ? "jumping-left" : "jumping-right");