summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormajortom6 <tombarrett@siu.edu>2017-02-18 08:29:31 -0600
committermajortom6 <tombarrett@siu.edu>2017-02-18 08:29:31 -0600
commit600ce4ae4179ddcb9849c6bb7646f8fc1e79c459 (patch)
treea59456757c403523b6fe084b5e99affe44f15b55
parent244010180db98a75062e7bf1ce3541a9e046b06b (diff)
fixed stupid segfault
-rw-r--r--src/creature.cpp1
-rw-r--r--src/list.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/creature.cpp b/src/creature.cpp
index 1cd0a52..dc5a307 100644
--- a/src/creature.cpp
+++ b/src/creature.cpp
@@ -19,6 +19,7 @@ Creature::Creature(Window M, SDL_Rect R, Dna D)
able = true;
pregnancyReady = false;
pregnate = false;
+ hasTarget = false;
}
void Creature::Behavior()
diff --git a/src/list.cpp b/src/list.cpp
index 4f2ddc4..68a71c9 100644
--- a/src/list.cpp
+++ b/src/list.cpp
@@ -84,7 +84,7 @@ std::vector<Entity*> List::getNear(Creature nC)
continue;
else if( nC.getBestSense() > Distance(nC.getRect(),it->getRect()) )
N.push_back(&(*it));
-
+
return N;
}