aboutsummaryrefslogtreecommitdiffstats
path: root/src/entities.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2015-10-07 12:29:55 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2015-10-07 12:29:55 -0400
commit281da1f81b1eef9e05e881e12d986b6b45ce8696 (patch)
tree82eba850f385733baeafa5c2dbecb33e71ec7d33 /src/entities.cpp
parent40efc2db79c205d122ca9557c9cd0d5679a37446 (diff)
Fixed jumping animation
Diffstat (limited to 'src/entities.cpp')
-rw-r--r--src/entities.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/entities.cpp b/src/entities.cpp
index 13c042b..127adae 100644
--- a/src/entities.cpp
+++ b/src/entities.cpp
@@ -53,7 +53,10 @@ void Entity::draw(void){ //draws the entities
texState-=1;
if(texState==0)up=true;
}
- }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]);
@@ -65,7 +68,9 @@ void Entity::draw(void){ //draws the entities
glBindTexture(GL_TEXTURE_2D,texture[2]);
break;
}
- }else glBindTexture(GL_TEXTURE_2D,texture[0]);
+ }else{
+ glBindTexture(GL_TEXTURE_2D,texture[0]);
+ }
}else{
glBindTexture(GL_TEXTURE_2D,texture[0]);
}