From 279e15f894e615e8eba7ef178c09651cc5bb184d Mon Sep 17 00:00:00 2001 From: Benau Date: Thu, 30 Aug 2018 01:42:19 +0800 Subject: [PATCH] Fix attachment for ghost karts --- src/karts/ghost_kart.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/karts/ghost_kart.cpp b/src/karts/ghost_kart.cpp index 14cfd608d..cc7bfa654 100644 --- a/src/karts/ghost_kart.cpp +++ b/src/karts/ghost_kart.cpp @@ -152,15 +152,15 @@ void GhostKart::update(int ticks) Attachment::AttachmentType attach_type = ReplayRecorder::codeToEnumAttach(m_all_bonus_info[idx].m_attachment); - int attach_ticks = 0; + int16_t attach_ticks = 0; if (attach_type == Attachment::ATTACH_BUBBLEGUM_SHIELD) - attach_ticks = stk_config->time2Ticks(10); + attach_ticks = (int16_t)stk_config->time2Ticks(10); else if (attach_type == Attachment::ATTACH_BOMB) - attach_ticks = stk_config->time2Ticks(30); + attach_ticks = (int16_t)stk_config->time2Ticks(30); // The replay history will take care of clearing, // just make sure it won't expire by itself else - attach_ticks = stk_config->time2Ticks(300); + attach_ticks = 32767; if ( attach_type == Attachment::ATTACH_NOTHING ) m_attachment->clear();