From 1e88bc916af1a76e4790bdfcac459bf7ee3e0d48 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 5 Oct 2015 07:30:11 -0400 Subject: quest lights --- include/entities.h | 3 +-- src/entities.cpp | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/entities.h b/include/entities.h index 4c1b484..e579355 100644 --- a/include/entities.h +++ b/include/entities.h @@ -59,9 +59,8 @@ public: }; class NPC : public Entity{ -private: - std::vectoraiFunc; public: + std::vectoraiFunc; NPC(); void addAIFunc(int (*func)(NPC *)); void interact(); diff --git a/src/entities.cpp b/src/entities.cpp index d5328f0..43c7bf3 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -22,6 +22,10 @@ void Entity::spawn(float x, float y){ //spawns the entity you pass to it based o void Entity::draw(void){ //draws the entities if(type==NPCT){ + if(NPCp(this)->aiFunc.size()){ + glColor3ub(255,255,0); + glRectf(loc.x,loc.y+height+HLINE,loc.x+width,loc.y+height+HLINE*5); + } if(gender == MALE) glColor3ub(0,0,100); else if(gender == FEMALE) -- cgit v1.2.3