Give better diagnostics when trying to use kart rank and it's not set

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5327 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2010-04-30 20:21:07 +00:00
parent 8798ada9d9
commit 889a4e4562
2 changed files with 4 additions and 4 deletions

View File

@@ -289,13 +289,12 @@ void Powerup::use()
*/
void Powerup::hitBonusBox(int n, const Item &item, int add_info)
{
unsigned int position = m_owner->getPosition();
int position = m_owner->getPosition();
assert(position != -1);
PowerupManager::PowerupType new_powerup =
powerup_manager->getRandomPowerup(position);
World *world = World::getWorld();
if(m_type==PowerupManager::POWERUP_NOTHING)
{
set( new_powerup, n );

View File

@@ -90,6 +90,7 @@ Kart::Kart (const std::string& ident, int position,
m_saved_controller = NULL;
m_view_blocked_by_plunger = 0;
m_race_position = -1;
// Initialize custom sound vector (TODO: add back when properly done)
// m_custom_sounds.resize(SFXManager::NUM_CUSTOMS);