summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/GameInitDispose.cpp4
-rw-r--r--src/GameTick.cpp13
2 files changed, 7 insertions, 10 deletions
diff --git a/src/GameInitDispose.cpp b/src/GameInitDispose.cpp
index 83435fb..4182c24 100644
--- a/src/GameInitDispose.cpp
+++ b/src/GameInitDispose.cpp
@@ -309,9 +309,9 @@ void initGame(Game* game)
 	auto& vip = game->person[game->numpeople = 1];
 	vip.type = viptype;
 	vip.whichgun = nogun;
-	vip.aiming = 0;
+	vip.aiming = false;
 	vip.killtarget = -1;
-	vip.existing = 1;
+	vip.existing = true;
 
 	vip.playerrotation = 0;
 	vip.whichcostume = vipcostume;
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;