aboutsummaryrefslogtreecommitdiffstats
path: root/src/entities.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2015-09-29 08:08:08 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2015-09-29 08:08:08 -0400
commitb195f57a6ad36f795c9a03e525357e5df246f26f (patch)
treec1ebee302d2402a63b357d9abf5c5404d3d38779 /src/entities.cpp
parent34e2794d647447f6ddb29419abbe2f44593ba1fa (diff)
Fixed extra entity, added mouse square, added quests class
Diffstat (limited to 'src/entities.cpp')
-rw-r--r--src/entities.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/entities.cpp b/src/entities.cpp
index a7737b3..1058b1b 100644
--- a/src/entities.cpp
+++ b/src/entities.cpp
@@ -84,12 +84,14 @@ unsigned int Structures::spawn(_TYPE t, float x, float y){ //spawns a structure
height = 16 * HLINE;
int tempN = (getRand() % 5 + 1); //amount of villagers that will spawn
+ //int tempN=200;
for(int i=0;i<tempN;i++){
entity.push_back(new NPC()); //create a new entity of NPC type
npc.push_back(NPC()); //create new NPC
entity[entity.size()] = &npc[npc.size()-1]; //set the new entity to have the same traits as an NPC
entity[entity.size()-1]->spawn(loc.x + (float)(i - 5),100); //sets the position of the villager around the village
}
+ entity.pop_back();
return entity.size();
}
}