From: drumsetmonkey Date: Mon, 28 Sep 2015 12:13:09 +0000 (-0400) Subject: Fixed entities X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=c8b859da1c52205973ad853eec91bf5a7cb882bb;p=clyne%2Fgamedev.git Fixed entities --- diff --git a/src/entities.cpp b/src/entities.cpp index da28851..d31f427 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -50,9 +50,9 @@ NPC::NPC(){ width = HLINE * 8; height = HLINE * 12; speed = 1; - type = 0; + type = 1; subtype = 0; - alive = false; + alive = true; canMove = true; } @@ -78,14 +78,15 @@ unsigned int Structures::spawn(int t, float x, float y){ //int tempN = (getRand() % 5 + 1); int tempN = 2; for(int i=0;ialive=true; - entity[entity.size()]->type = 1; - entity[entity.size()]->spawn(loc.x + (float)(i - 5) / 8,100); + entity[entity.size()-1]->spawn(loc.x + (float)(i - 5) / 8,100); + std::cout<<"Entity Type["<type<alive<alive&&entity[i]->type == 1){ entity[i]->wander(90, &entity[i]->vel); + std::cout<<"works"<