aboutsummaryrefslogtreecommitdiffstats
path: root/src/entities.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2015-12-17 08:29:17 -0500
committerdrumsetmonkey <abelleisle@roadrunner.com>2015-12-17 08:29:17 -0500
commitf871cdcce267621adac4e5eb1f6705fd26462544 (patch)
tree9a6d051c5c6375f32517ac9f30499a67f3f80b57 /src/entities.cpp
parent85fb9f0a75f9a441d35e0ed48f250d7b07301483 (diff)
parent15889a45b8ee37d43e248cec351e9f6882c21ff3 (diff)
Merge branch 'master' of http://github.com/tcsullivan/gamedev
Diffstat (limited to 'src/entities.cpp')
-rw-r--r--src/entities.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/entities.cpp b/src/entities.cpp
index 0df6b17..6a2f4db 100644
--- a/src/entities.cpp
+++ b/src/entities.cpp
@@ -107,7 +107,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 = rand() % 10 - 1;
+ randDialog = rand() % 12 - 1;
}
NPC::~NPC(){
while(!aiFunc.empty()){
@@ -218,7 +218,7 @@ void Entity::draw(void){ //draws the entities
case PLAYERT:
static int texState = 0;
static bool up = true;
- if(loops % (int)((float)4/(float)speed) == 0){
+ if(speed && !(loops % (int)(4.0f/(float)speed))){
//currentWorld->addParticle(loc.x,loc.y-HLINE,HLINE,HLINE,0,0,{0.0f,.17f,0.0f},1000);
if(up){
if(++texState==2)up=false;
@@ -343,7 +343,8 @@ const char *randomDialog[] = {
"HELP MY CAPS LOCK IS STUCK",
"You know, if anyone ever asked me who I wanted to be when I grow up, I would say Abby Ross.",
"I want to have the wallpaper in our house changed. It doesn\'t really fit the environment.",
- "Frig."
+ "Frig.",
+ "The sine of theta equals the opposite over the hypotenuese."
};
void NPC::interact(){ //have the npc's interact back to the player