equal
deleted
inserted
replaced
471 break; |
471 break; |
472 case MAPGEN_DRAWN: |
472 case MAPGEN_DRAWN: |
473 emit drawMapRequested(); |
473 emit drawMapRequested(); |
474 break; |
474 break; |
475 default: |
475 default: |
476 if(chooseMap->currentIndex() <= numMissions + MAPGEN_MAP) |
476 if(chooseMap->currentIndex() <= numMissions + MAPGEN_MAP + 1) |
477 setRandomMission(); |
477 setRandomMission(); |
478 else |
478 else |
479 setRandomStatic(); |
479 setRandomStatic(); |
480 break; |
480 break; |
481 } |
481 } |
482 } |
482 } |
483 |
483 |
484 void HWMapContainer::setRandomStatic() |
484 void HWMapContainer::setRandomStatic() |
485 { |
485 { |
486 chooseMap->setCurrentIndex(MAPGEN_MAP + 2 + numMissions + rand() % (chooseMap->count() - MAPGEN_MAP - 2 - numMissions)); |
486 int i = MAPGEN_MAP + 3 + numMissions + rand() % (chooseMap->count() - MAPGEN_MAP - 3 - numMissions); |
|
487 chooseMap->setCurrentIndex(i); |
487 setRandomSeed(); |
488 setRandomSeed(); |
488 } |
489 } |
489 |
490 |
490 void HWMapContainer::setRandomMission() |
491 void HWMapContainer::setRandomMission() |
491 { |
492 { |
492 chooseMap->setCurrentIndex(MAPGEN_MAP + rand() % numMissions); |
493 int i = MAPGEN_MAP + 2 + rand() % numMissions; |
|
494 qDebug() << i << MAPGEN_MAP << numMissions; |
|
495 chooseMap->setCurrentIndex(i); |
493 setRandomSeed(); |
496 setRandomSeed(); |
494 } |
497 } |
495 |
498 |
496 void HWMapContainer::setRandomSeed() |
499 void HWMapContainer::setRandomSeed() |
497 { |
500 { |