[Add] Amount of generated NPCs is now level dependent.

This commit is contained in:
Tamir Atias 2012-02-05 19:51:26 +02:00
parent 815e1b338d
commit 1c22f624e6

View File

@ -269,7 +269,7 @@ findNext:
} }
void LevelGen::GenerateEnemies(void) { void LevelGen::GenerateEnemies(void) {
int npcsToGen = 4 + (rand() % 4); int npcsToGen = 4 + (rand() % ((_player->GetLevel() * 2) + 4));
for(int i = 0; i < npcsToGen; i++) { for(int i = 0; i < npcsToGen; i++) {
int spawnX; int spawnX;