A kart with a bomb now explodes (#427).

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9870 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2011-09-20 01:46:11 +00:00
parent e371a273d6
commit c7cbec06b8

View File

@@ -514,6 +514,13 @@ bool RubberBall::hit(Kart* kart, PhysicalObject* object)
// If the object is not the main target, only flatten the kart
if(kart!=m_target)
{
// If the squashed kart has a bomb, explode it.
if(kart->getAttachment()->getType()==Attachment::ATTACH_BOMB)
{
// make bomb explode
kart->getAttachment()->update(10000);
return false;
}
kart->setSquash(m_st_squash_duration, m_st_squash_slowdown);
return false;
}