diff options
author | majortom6 <tombarrett@siu.edu> | 2017-02-18 08:29:31 -0600 |
---|---|---|
committer | majortom6 <tombarrett@siu.edu> | 2017-02-18 08:29:31 -0600 |
commit | 600ce4ae4179ddcb9849c6bb7646f8fc1e79c459 (patch) | |
tree | a59456757c403523b6fe084b5e99affe44f15b55 /src | |
parent | 244010180db98a75062e7bf1ce3541a9e046b06b (diff) |
fixed stupid segfault
Diffstat (limited to 'src')
-rw-r--r-- | src/creature.cpp | 1 | ||||
-rw-r--r-- | src/list.cpp | 2 |
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; } |