diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2015-10-15 09:08:13 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2015-10-15 09:08:13 -0400 |
commit | 42da2e6dd95c29c723ee5377241d97e29e251903 (patch) | |
tree | ef0395bb9f4d73422b974fa1838c44c62a284eb1 /src/entities.cpp | |
parent | 5c2179bc9afa809fa3b915bea0d75f62f90f0644 (diff) | |
parent | ef74ae83db1d3049e4e890df77d25ac6e1f7719f (diff) |
quest fixes
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 080da3e..32b74fe 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -113,7 +113,9 @@ void Entity::draw(void){ //draws the entities if(ground == 0){ glBindTexture(GL_TEXTURE_2D, texture[1]); } - else if(vel.x != 0){ + if(ground == 0){ + glBindTexture(GL_TEXTURE_2D, texture[1]); + }else if(vel.x != 0){ switch(texState){ case 0: glBindTexture(GL_TEXTURE_2D,texture[1]); @@ -158,7 +160,7 @@ void Entity::draw(void){ //draws the entities ui::setFontSize(16); ui::putText(((SCREEN_WIDTH / 2 ) + loc.x) - 125, SCREEN_HEIGHT - ui::fontSize, "Health: %d/%d",health,maxHealth); glColor3ub(255,0,0); - glRectf((SCREEN_WIDTH / 2 + loc.x) - 125, SCREEN_HEIGHT - 32, ((SCREEN_WIDTH / 2 + loc.x) - 125) + (int)((int)(health / maxHealth) * 100), SCREEN_HEIGHT - 32 + 12); + glRectf((SCREEN_WIDTH / 2 + loc.x) - 125, SCREEN_HEIGHT - 32, ((SCREEN_WIDTH / 2 + loc.x) - 125) + (((float)health / (float)maxHealth) * 100), SCREEN_HEIGHT - 32 + 12); } if(near){ ui::setFontSize(14); |