Remove hardcoded number assuming tick duration

This commit is contained in:
Alayan
2018-09-18 03:30:31 +02:00
parent c032bfe941
commit 488e53d669

View File

@@ -1452,7 +1452,7 @@ void SkiddingAI::handleBubblegum(int item_skill, const std::vector<const Item *>
//if it is a bomb, wait : we may pass it to another kart before the timer runs out
if (item_skill == 5 && type == Attachment::ATTACH_BOMB)
{
if (m_kart->getAttachment()->getTicksLeft() > 360) //3 seconds
if (m_kart->getAttachment()->getTicksLeft() > stk_config->time2Ticks(3))
{
m_controls->setFire(true);
m_controls->setLookBack(false);
@@ -1778,7 +1778,7 @@ void SkiddingAI::handleSwatter(int item_skill)
//if it is a bomb, wait : we may pass it to another kart before the timer runs out
if (item_skill == 5 && type == Attachment::ATTACH_BOMB)
{
if (m_kart->getAttachment()->getTicksLeft() > 360) //3 seconds
if (m_kart->getAttachment()->getTicksLeft() > stk_config->time2Ticks(3))
{
m_controls->setFire(true);
m_controls->setLookBack(false);