Apparently the code police weren't satisfied... :) Eliminating the duplicate ints & extra assignments.
This commit is contained in:
@@ -1251,9 +1251,7 @@ AIPlayer * AIPlayerFactory::createAIPlayer(MTGAllCards * collection, Player * op
|
||||
deckid = 1 + WRand() % (nbdecks);
|
||||
}
|
||||
sprintf(deckFile, JGE_GET_RES("ai/baka/deck%i.txt").c_str(), deckid);
|
||||
int tempDeckId = deckid;
|
||||
int avatarId = 0;
|
||||
avatarId = tempDeckId % 100;
|
||||
int avatarId = deckid % 100;
|
||||
sprintf(avatarFile, "avatar%i.jpg", avatarId);
|
||||
sprintf(deckFileSmall, "ai_baka_deck%i", deckid);
|
||||
}
|
||||
|
||||
@@ -70,12 +70,7 @@ void DeckMetaData::LoadStats()
|
||||
// since we only have 100 stock avatar images, we need to recycle the images for deck numbers > 99
|
||||
int DeckMetaData::getAvatarId()
|
||||
{
|
||||
if ( mDeckId < 101 )
|
||||
return mDeckId;
|
||||
int tempDeckId = mDeckId;
|
||||
int avatarId = 0;
|
||||
avatarId = tempDeckId%100;
|
||||
return avatarId;
|
||||
return mDeckId % 100;
|
||||
}
|
||||
|
||||
void DeckMetaData::LoadDeck()
|
||||
|
||||
Reference in New Issue
Block a user