diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2015-09-28 08:47:43 -0400 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2015-09-28 08:47:43 -0400 |
commit | 113bb97e4ce7db5bc275e0dccf7c790c86cda5d7 (patch) | |
tree | 6db84a77b149476ecd45f838237385ab7d360cf3 /src/main.cpp | |
parent | 9630c8a49cbad7b1b71b9401ff24881ebf4c7c25 (diff) |
Added enum for types and improved NPCs
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index 1e8b942..b24c747 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -109,8 +109,8 @@ int main(int argc, char *argv[]){ entity[0]=&build[0]; static unsigned int i; - build[0].spawn(-1,0,10); - for(i=0;i<entity.size()+1;i++){ + build[0].spawn(STRUCTURET,0,10); + for(i=0;i<=entity.size();i++){ entity[i]->inWorld=test; } @@ -196,9 +196,9 @@ void logic(){ ui::handleEvents(); currentWorld->detect(player); for(int i=0;i<=entity.size();i++){ - if(entity[i]->alive&&entity[i]->type == 1){ + if(entity[i]->alive&&entity[i]->type == NPCT){ entity[i]->wander(90, &entity[i]->vel); - std::cout<<"works"<<i<<std::endl; + //std::cout<<"works"<<i<<std::endl; } } } |