From f6685af2e16da77dcc22f8edbc52914b10231c4a Mon Sep 17 00:00:00 2001 From: hikerstk Date: Tue, 23 Jul 2013 22:11:12 +0000 Subject: [PATCH] Added support for looped jumping animation; renamed begin/end_jump to jump_start/end to be more consistent. Added a test loop to Sara's animation. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@13330 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/karts/kart.cpp | 2 +- src/karts/kart_model.cpp | 5 +++-- src/karts/kart_model.hpp | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index c51f571f8..ce83c62e0 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -1221,7 +1221,7 @@ void Kart::update(float dt) // the texture has the jump property set. if(t>getKartProperties()->getJumpAnimationTime() || last_m->isJumpTexture() ) - m_kart_model->setAnimation(KartModel::AF_BEGIN_JUMP); + m_kart_model->setAnimation(KartModel::AF_JUMP_START); m_is_jumping = true; } m_jump_time+=dt; diff --git a/src/karts/kart_model.cpp b/src/karts/kart_model.cpp index 240800925..814f64ede 100644 --- a/src/karts/kart_model.cpp +++ b/src/karts/kart_model.cpp @@ -120,8 +120,9 @@ void KartModel::loadInfo(const XMLNode &node) animation_node->get("end-losing", &m_animation_frame[AF_LOSE_END] ); animation_node->get("start-explosion",&m_animation_frame[AF_LOSE_START]); animation_node->get("end-explosion", &m_animation_frame[AF_LOSE_END] ); - animation_node->get("start-jump", &m_animation_frame[AF_BEGIN_JUMP]); - animation_node->get("end-jump", &m_animation_frame[AF_END_JUMP] ); + animation_node->get("start-jump", &m_animation_frame[AF_JUMP_START]); + animation_node->get("start-jump-loop",&m_animation_frame[AF_JUMP_LOOP] ); + animation_node->get("end-jump", &m_animation_frame[AF_JUMP_END] ); animation_node->get("speed", &m_animation_speed ); } diff --git a/src/karts/kart_model.hpp b/src/karts/kart_model.hpp index 01092bbe9..326f7bcca 100644 --- a/src/karts/kart_model.hpp +++ b/src/karts/kart_model.hpp @@ -60,8 +60,9 @@ public: AF_LOSE_END, // End losing animation AF_BEGIN_EXPLOSION, // Begin explosion animation AF_END_EXPLOSION, // End explosion animation - AF_BEGIN_JUMP, // Begin of jump - AF_END_JUMP, // End of jump + AF_JUMP_START, // Begin of jump + AF_JUMP_LOOP, // Begin of jump loop + AF_JUMP_END, // End of jump AF_WIN_START, // Begin of win animation AF_WIN_LOOP_START, // Begin of win loop animation AF_WIN_END, // End of win animation