diff options
Diffstat (limited to 'src/entities.cpp')
-rw-r--r-- | src/entities.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/entities.cpp b/src/entities.cpp index 5a9c42a..f079b03 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -3,6 +3,8 @@ #include <istream> +#define RAND_DIALOG_COUNT 13 + extern std::istream *names; extern unsigned int loops; @@ -126,7 +128,7 @@ NPC::NPC(){ //sets all of the NPC specific traits on object creation tex = new Texturec(1,"assets/NPC.png"); inv = new Inventory(NPC_INV_SIZE); - randDialog = 6;//rand() % 12 - 1; + randDialog = rand() % RAND_DIALOG_COUNT - 1; dialogIndex = 0; } NPC::~NPC(){ @@ -392,7 +394,7 @@ void NPC::clearAIFunc(void){ aiFunc.clear(); } -const char *randomDialog[] = { +const char *randomDialog[RAND_DIALOG_COUNT] = { "What a beautiful day it is.", "Have you ever went fast? I have.", "I heard if you complete a quest, you'll get a special reward.", |