summary refs log tree commit diff
path: root/src/GameTick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GameTick.cpp')
-rw-r--r--src/GameTick.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/GameTick.cpp b/src/GameTick.cpp
index 0f883ad..47e6af3 100644
--- a/src/GameTick.cpp
+++ b/src/GameTick.cpp
@@ -559,6 +559,9 @@ void spawnNpc(Game* game)
 		    < max_people_block)
 			break;
 	}
+	if (game->citypeoplenum[blockspawnx][blockspawny] >= max_people_block
+	    || (game->spawndelay -= multiplier) > 0)
+		return;
 
 	size_t k = 0;
 	if (game->numpeople < max_people)
@@ -572,8 +575,7 @@ void spawnNpc(Game* game)
 				break;
 			}
 		}
-	if (game->citypeoplenum[blockspawnx][blockspawny] >= max_people_block
-	    || (game->spawndelay -= multiplier) > 0 || k == 0)
+	if (k == 0)
 		return;
 	game->citypeoplenum[blockspawnx][blockspawny]++;
 	game->spawndelay = 0.1f;
@@ -582,12 +584,7 @@ void spawnNpc(Game* game)
 	npc.whichblockx = blockspawnx;
 	npc.whichblocky = blockspawny;
 	npc.whichcostume = casualcostumes + randUint(numcasual);
-	if (npc.type == viptype) {
-		npc.existing = true;
-		npc.pathsize = 0.98f + 0.04f * randFloat();
-		npc.speedmult = 0.8f + 0.4f * randFloat();
-		npc.targetanimation = walkanim;
-	} else if (game->type == zombie_type) {
+	if (game->type == zombie_type) {
 		npc.type = zombietype;
 		npc.aiming = false;
 		npc.existing = true;