aboutsummaryrefslogtreecommitdiffstats
path: root/src/entities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/entities.cpp')
-rw-r--r--src/entities.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/entities.cpp b/src/entities.cpp
index 2bc5a61..9b87150 100644
--- a/src/entities.cpp
+++ b/src/entities.cpp
@@ -5,6 +5,9 @@ extern std::vector<Entity*>entity;
extern std::vector<NPC>npc;
extern std::vector<Structures>build;
+extern FILE* names;
+extern unsigned int loops;
+
void Entity::spawn(float x, float y){ //spawns the entity you pass to it based off of coords and global entity settings
loc.x = x;
loc.y = y;
@@ -245,6 +248,7 @@ unsigned int Structures::spawn(_TYPE t, float x, float y){ //spawns a structure
loc.y = y;
type = t;
alive = true;
+ health = maxHealth = 1;
/*VILLAGE*/
//spawns a village