Add 5s to the FTL countdown when the leader is hit by a flyable
This commit is contained in:
parent
2e6b7fd8ac
commit
089f6d108e
@ -221,6 +221,20 @@ bool FollowTheLeaderRace::isRaceOver()
|
||||
}
|
||||
} // isRaceOver
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/** If the leader kart is hit, increase the delay to the next elimination */
|
||||
bool FollowTheLeaderRace::kartHit(int kart_id, int hitter)
|
||||
{
|
||||
if (kart_id == 0)
|
||||
{
|
||||
int countdown = getTimeTicks();
|
||||
countdown += stk_config->time2Ticks(5.0f);
|
||||
setTicks(countdown);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/** Called at the end of a race. Updates highscores, pauses the game, and
|
||||
* informs the unlock manager about the finished race. This function must
|
||||
|
@ -54,6 +54,7 @@ public:
|
||||
virtual void init() OVERRIDE;
|
||||
virtual void terminateRace() OVERRIDE;
|
||||
virtual bool isRaceOver() OVERRIDE;
|
||||
virtual bool kartHit(int kart_id, int hitter = -1) OVERRIDE;
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns if this type of race has laps. */
|
||||
virtual bool raceHasLaps() OVERRIDE { return false; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user