Fix the possibility to get 1 lap/race achievements in battle/soccer/egg hunt
This commit is contained in:
parent
8995027d42
commit
5ea5b69200
@ -330,7 +330,8 @@ void Attachment::hitBanana(ItemState *item_state)
|
||||
if (m_kart->getController()->canGetAchievements())
|
||||
{
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::BANANA, 1);
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::BANANA_1RACE, 1);
|
||||
if (race_manager->isLinearRaceMode())
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::BANANA_1RACE, 1);
|
||||
}
|
||||
//Bubble gum shield effect:
|
||||
if(m_type == ATTACH_BUBBLEGUM_SHIELD ||
|
||||
|
@ -571,7 +571,8 @@ void Flyable::explode(AbstractKart *kart_hit, PhysicalObject *object,
|
||||
if (m_owner->getWorldKartId() != kart->getWorldKartId())
|
||||
PlayerManager::addKartHit(kart->getWorldKartId());
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::ALL_HITS, 1);
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::ALL_HITS_1RACE, 1);
|
||||
if (race_manager->isLinearRaceMode())
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::ALL_HITS_1RACE, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -253,7 +253,8 @@ void Powerup::use()
|
||||
m_kart->getController()->canGetAchievements() )
|
||||
{
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::POWERUP_USED, 1);
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::POWERUP_USED_1RACE, 1);
|
||||
if (race_manager->isLinearRaceMode())
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::POWERUP_USED_1RACE, 1);
|
||||
}
|
||||
|
||||
// Play custom kart sound when collectible is used //TODO: what about the bubble gum?
|
||||
|
@ -375,9 +375,12 @@ void Swatter::squashThingsAround()
|
||||
{
|
||||
PlayerManager::addKartHit(m_closest_kart->getWorldKartId());
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::SWATTER_HIT, 1);
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::SWATTER_HIT_1RACE, 1);
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::ALL_HITS, 1);
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::ALL_HITS_1RACE, 1);
|
||||
if (race_manager->isLinearRaceMode())
|
||||
{
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::SWATTER_HIT_1RACE, 1);
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::ALL_HITS_1RACE, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -556,10 +556,13 @@ void Skidding::update(int ticks, bool is_on_ground,
|
||||
|
||||
if (m_kart->getController()->canGetAchievements())
|
||||
{
|
||||
PlayerManager::increaseAchievement(
|
||||
AchievementsStatus::SKIDDING_1LAP, 1);
|
||||
PlayerManager::increaseAchievement(
|
||||
AchievementsStatus::SKIDDING_1RACE, 1);
|
||||
if (race_manager->isLinearRaceMode())
|
||||
{
|
||||
PlayerManager::increaseAchievement(
|
||||
AchievementsStatus::SKIDDING_1LAP, 1);
|
||||
PlayerManager::increaseAchievement(
|
||||
AchievementsStatus::SKIDDING_1RACE, 1);
|
||||
}
|
||||
PlayerManager::increaseAchievement(
|
||||
AchievementsStatus::SKIDDING, 1);
|
||||
}
|
||||
|
@ -363,7 +363,8 @@ void Physics::update(int ticks)
|
||||
if (type == PowerupManager::POWERUP_BOWLING)
|
||||
{
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::BOWLING_HIT, 1);
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::BOWLING_HIT_1RACE, 1);
|
||||
if (race_manager->isLinearRaceMode())
|
||||
PlayerManager::increaseAchievement(AchievementsStatus::BOWLING_HIT_1RACE, 1);
|
||||
} // is bowling ball
|
||||
} // if target_kart != kart && is a player kart and is current player
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user