Display parachute for a short while when a kart was shielded. Player should be informed that parachute is the reason of removed shield.
Solution was suggested in comment to #1038 and is certainly not perfect, but I don't have better idea. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14367 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
a153eb8c2c
commit
852512ec0a
@ -382,16 +382,15 @@ void Powerup::use()
|
||||
{
|
||||
AbstractKart *kart=world->getKart(i);
|
||||
if(kart->isEliminated() || kart== m_owner) continue;
|
||||
if(kart->isShielded())
|
||||
{
|
||||
kart->decreaseShieldTime();
|
||||
continue;
|
||||
}
|
||||
|
||||
if(m_owner->getPosition() > kart->getPosition())
|
||||
{
|
||||
// Player should be informed that parachute is the reason
|
||||
// of removed bubblegum shield. In this case parachute is
|
||||
// displayed for a short while.
|
||||
kart->getAttachment()
|
||||
->set(Attachment::ATTACH_PARACHUTE,
|
||||
stk_config->m_parachute_time_other);
|
||||
->set(Attachment::ATTACH_PARACHUTE, kart->isShielded() ?
|
||||
0.2f : stk_config->m_parachute_time_other);
|
||||
|
||||
if(kart->getController()->isPlayerController())
|
||||
player_kart = kart;
|
||||
|
Loading…
Reference in New Issue
Block a user