From: drumsetmonkey Date: Wed, 7 Oct 2015 16:29:55 +0000 (-0400) Subject: Fixed jumping animation X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=281da1f81b1eef9e05e881e12d986b6b45ce8696;p=clyne%2Fgamedev.git Fixed jumping animation --- diff --git a/assets/house1.png b/assets/house1.png index 2f5034b..2022992 100644 Binary files a/assets/house1.png and b/assets/house1.png differ diff --git a/out/entities.o b/out/entities.o index db0a4aa..69472f4 100644 Binary files a/out/entities.o and b/out/entities.o differ diff --git a/out/inventory.o b/out/inventory.o index 559aff1..d88bf53 100644 Binary files a/out/inventory.o and b/out/inventory.o differ diff --git a/out/ui.o b/out/ui.o index 73dddad..e4cd1fd 100644 Binary files a/out/ui.o and b/out/ui.o differ diff --git a/out/world.o b/out/world.o index 6f79983..4997e5b 100644 Binary files a/out/world.o and b/out/world.o differ 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]); }